title: Decode Median String Original String
signature: decode_median_string_original_string <- function(s) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(s, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(s), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          " EgvQCeqYpZtv", 
          "tpqCvE gQeYZv"
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          "488540", 
          "484850"
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          "0000101010111", 
          "1000000011111"
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          "syw", 
          "ysw"
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          "402355", 
          "524035"
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          "0", 
          "0"
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          "wmHMlAtq", 
          "tlHwmMAq"
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          "7962", 
          "6792"
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          "111111", 
          "111111"
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          "UbgRGDquop", 
          "oqGgUbRDup"
      )))
  
  }
  
  main()
source_py: def decode_median_string_original_string(s):
      l = len(s)
      s1 = ''
      if ((l % 2) == 0):
          isEven = True
      else:
          isEven = False
      for i in range(0, l, 2):
          if isEven:
              s1 = (s[i] + s1)
              s1 += s[(i + 1)]
          elif ((l - i) > 1):
              s1 += s[i]
              s1 = (s[(i + 1)] + s1)
          else:
              s1 += s[i]
      return s1
source_cpp: string decode_median_string_original_string(string s) {
    int l = s . length ( );
    string s1 = "";
    bool isEven = ( l % 2 == 0 ) ? true : false;
    for ( int i = 0;
    i < l;
    i += 2 ) {
      if ( isEven ) {
        s1 = s [ i ] + s1;
        s1 += s [ i + 1 ];
      }
      else {
        if ( l - i > 1 ) {
          s1 += s [ i ];
          s1 = s [ i + 1 ] + s1;
        }
        else {
          s1 += s [ i ];
        }
      }
    }
    return s1;
  }