title: Decode Median String Original String
signature: class Solution {
  
      public String decodeMedianStringOriginalString(String s) {
test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(String s, String expected){
          try{
              Driver driver = new Driver();
              if (driver.run(s,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(" EgvQCeqYpZtv", "tpqCvE gQeYZv");
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution("488540", "484850");
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution("0000101010111", "1000000011111");
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution("syw", "ysw");
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution("402355", "524035");
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution("0", "0");
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution("wmHMlAtq", "tlHwmMAq");
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution("7962", "6792");
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution("111111", "111111");
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution("UbgRGDquop", "oqGgUbRDup");
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(String s, String expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(s),expected);
      }
      
      public boolean validateSolution(String actual, String expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
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;
  }