title: Converting One String Using Append Delete Last Operations
signature: function converting_one_string_using_append_delete_last_operations(str1, str2, k)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(str1, str2, k, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(str1, str2, k), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver("ZNHGro", "jAdbtDUYQu", 3, false);
      @printf("TEST-0...%s\n",result);
      
      result = driver("382880806774", "65565", 10, false);
      @printf("TEST-1...%s\n",result);
      
      result = driver("0", "00100010100", 2, true);
      @printf("TEST-2...%s\n",result);
      
      result = driver("lxHTRFCTSQ", "sViXYE", 89, true);
      @printf("TEST-3...%s\n",result);
      
      result = driver("6399914758", "780990121", 9, true);
      @printf("TEST-4...%s\n",result);
      
      result = driver("01100011100000", "0100", 0, true);
      @printf("TEST-5...%s\n",result);
      
      result = driver("WkGqlob", "NpQVdXzEtUZy", 6, false);
      @printf("TEST-6...%s\n",result);
      
      result = driver("46974006151", "74438", 11, false);
      @printf("TEST-7...%s\n",result);
      
      result = driver("1001001", "1000010", 15, true);
      @printf("TEST-8...%s\n",result);
      
      result = driver("IJQ", "nFOHAeYEAp", 42, true);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
source_py: def converting_one_string_using_append_delete_last_operations(str1, str2, k):
      if ((len(str1) + len(str2)) < k):
          return True
      commonLength = 0
      for i in range(0, min(len(str1), len(str2)), 1):
          if (str1[i] == str2[i]):
              commonLength += 1
          else:
              break
      if (((((k - len(str1)) - len(str2)) + (2 * commonLength)) % 2) == 0):
          return True
      return False
source_cpp: bool converting_one_string_using_append_delete_last_operations(string str1, string str2, int k) {
    if ( ( str1 . length ( ) + str2 . length ( ) ) < k ) return true;
    int commonLength = 0;
    for ( int i = 0;
    i < min ( str1 . length ( ), str2 . length ( ) );
    i ++ ) {
      if ( str1 [ i ] == str2 [ i ] ) commonLength ++;
      else break;
    }
    if ( ( k - str1 . length ( ) - str2 . length ( ) + 2 * commonLength ) % 2 == 0 ) return true;
    return false;
  }