title: Converting One String Using Append Delete Last Operations
signature: convertingOneStringUsingAppendDeleteLastOperations(str1, str2, k) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(bool actual, bool expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(str1, str2, k, bool expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(str1, str2, k), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          "ZNHGro", "jAdbtDUYQu", 3, 
          false)
      }");
  
      print("TEST-1...${driver(
          "382880806774", "65565", 10, 
          false)
      }");
  
      print("TEST-2...${driver(
          "0", "00100010100", 2, 
          true)
      }");
  
      print("TEST-3...${driver(
          "lxHTRFCTSQ", "sViXYE", 89, 
          true)
      }");
  
      print("TEST-4...${driver(
          "6399914758", "780990121", 9, 
          true)
      }");
  
      print("TEST-5...${driver(
          "01100011100000", "0100", 0, 
          true)
      }");
  
      print("TEST-6...${driver(
          "WkGqlob", "NpQVdXzEtUZy", 6, 
          false)
      }");
  
      print("TEST-7...${driver(
          "46974006151", "74438", 11, 
          false)
      }");
  
      print("TEST-8...${driver(
          "1001001", "1000010", 15, 
          true)
      }");
  
      print("TEST-9...${driver(
          "IJQ", "nFOHAeYEAp", 42, 
          true)
      }");
  
      return 0;
  }
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;
  }