title: Converting One String Using Append Delete Last Operations
signature: convertingOneStringUsingAppendDeleteLastOperations :: String -> String -> Integer -> Bool
  convertingOneStringUsingAppendDeleteLastOperations str1 str2 k = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Bool -> Bool -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: String -> String -> Integer -> Bool -> String
  driver str1 str2 k expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME str1 str2 k) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver ("ZNHGro") ("jAdbtDUYQu") (3) (False) )
  
      printf "TEST-1...%s\n" (driver ("382880806774") ("65565") (10) (False) )
  
      printf "TEST-2...%s\n" (driver ("0") ("00100010100") (2) (True) )
  
      printf "TEST-3...%s\n" (driver ("lxHTRFCTSQ") ("sViXYE") (89) (True) )
  
      printf "TEST-4...%s\n" (driver ("6399914758") ("780990121") (9) (True) )
  
      printf "TEST-5...%s\n" (driver ("01100011100000") ("0100") (0) (True) )
  
      printf "TEST-6...%s\n" (driver ("WkGqlob") ("NpQVdXzEtUZy") (6) (False) )
  
      printf "TEST-7...%s\n" (driver ("46974006151") ("74438") (11) (False) )
  
      printf "TEST-8...%s\n" (driver ("1001001") ("1000010") (15) (True) )
  
      printf "TEST-9...%s\n" (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;
  }