title: Converting One String Using Append Delete Last Operations
signature: pub fn converting_one_string_using_append_delete_last_operations(str1: String, str2: String, k: i32) -> bool {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: bool, expected: bool)->bool{
  return actual==expected
  }
  pub fn driver(str1: String, str2: String, k: i32, expected: bool)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(str1, str2, k), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        "ZNHGro".to_string(), "jAdbtDUYQu".to_string(), 3, 
        false
      ));
      
      println!("TEST-1...{}", driver(
        "382880806774".to_string(), "65565".to_string(), 10, 
        false
      ));
      
      println!("TEST-2...{}", driver(
        "0".to_string(), "00100010100".to_string(), 2, 
        true
      ));
      
      println!("TEST-3...{}", driver(
        "lxHTRFCTSQ".to_string(), "sViXYE".to_string(), 89, 
        true
      ));
      
      println!("TEST-4...{}", driver(
        "6399914758".to_string(), "780990121".to_string(), 9, 
        true
      ));
      
      println!("TEST-5...{}", driver(
        "01100011100000".to_string(), "0100".to_string(), 0, 
        true
      ));
      
      println!("TEST-6...{}", driver(
        "WkGqlob".to_string(), "NpQVdXzEtUZy".to_string(), 6, 
        false
      ));
      
      println!("TEST-7...{}", driver(
        "46974006151".to_string(), "74438".to_string(), 11, 
        false
      ));
      
      println!("TEST-8...{}", driver(
        "1001001".to_string(), "1000010".to_string(), 15, 
        true
      ));
      
      println!("TEST-9...{}", driver(
        "IJQ".to_string(), "nFOHAeYEAp".to_string(), 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;
  }