title: Converting One String Using Append Delete Last Operations
signature: def convertingOneStringUsingAppendDeleteLastOperations(str1: String, str2: String, k: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Boolean , expected: Boolean): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(str1: String, str2: String, k: Int, expected: Boolean): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(str1, str2, k),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        "ZNHGro", "jAdbtDUYQu", 3, 
        false    
      )}")   
  
  
      println(s"TEST-1...${driver(
        "382880806774", "65565", 10, 
        false    
      )}")   
  
  
      println(s"TEST-2...${driver(
        "0", "00100010100", 2, 
        true    
      )}")   
  
  
      println(s"TEST-3...${driver(
        "lxHTRFCTSQ", "sViXYE", 89, 
        true    
      )}")   
  
  
      println(s"TEST-4...${driver(
        "6399914758", "780990121", 9, 
        true    
      )}")   
  
  
      println(s"TEST-5...${driver(
        "01100011100000", "0100", 0, 
        true    
      )}")   
  
  
      println(s"TEST-6...${driver(
        "WkGqlob", "NpQVdXzEtUZy", 6, 
        false    
      )}")   
  
  
      println(s"TEST-7...${driver(
        "46974006151", "74438", 11, 
        false    
      )}")   
  
  
      println(s"TEST-8...${driver(
        "1001001", "1000010", 15, 
        true    
      )}")   
  
  
      println(s"TEST-9...${driver(
        "IJQ", "nFOHAeYEAp", 42, 
        true    
      )}")   
  
  }
  
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;
  }