title: Check Possible Transform One String Another
signature: bool checkPossibleTransformOneStringAnother(string s1, string s2) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(bool actual, bool expected){
      return actual == expected;
  }
  
  string driver(string s1, string s2, bool expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(s1, s2), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver("daBcd", "ABC", true); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver("417514", "9", false); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver("010000", "1111011010", false); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver("ZcKYguiMrdyn", "iz", false); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver("argaju", "RAJ", true); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      result = driver("1110101101", "110101001", false); 
      cout << "TEST-" << 5 << "..."
           <<  result
           << "\n";
  
      result = driver("ySOCoSaygi", "aRhxkYqh", false); 
      cout << "TEST-" << 6 << "..."
           <<  result
           << "\n";
  
      result = driver("204", "6986871066", false); 
      cout << "TEST-" << 7 << "..."
           <<  result
           << "\n";
  
      result = driver("10011100000010", "0", true); 
      cout << "TEST-" << 8 << "..."
           <<  result
           << "\n";
  
      result = driver("nMAioozPmY", "WZFdDKw", false); 
      cout << "TEST-" << 9 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
source_py: def check_possible_transform_one_string_another(s1, s2):
      n = len(s1)
      m = len(s2)
      dp = [[False for i in range((m + 1))] for i in range((n + 1))]
      dp[0][0] = True
      for i in range(len(s1)):
          for j in range((len(s2) + 1)):
              if dp[i][j]:
                  if ((j < len(s2)) and (s1[i].upper() == s2[j])):
                      dp[(i + 1)][(j + 1)] = True
                  if (s1[i].isupper() == False):
                      dp[(i + 1)][j] = True
      return dp[n][m]
source_cpp: bool check_possible_transform_one_string_another(string s1, string s2) {
    int n = s1 . length ( );
    int m = s2 . length ( );
    bool dp [ n + 1 ] [ m + 1 ];
    for ( int i = 0;
    i <= n;
    i ++ ) {
      for ( int j = 0;
      j <= m;
      j ++ ) {
        dp [ i ] [ j ] = false;
      }
    }
    dp [ 0 ] [ 0 ] = true;
    for ( int i = 0;
    i < s1 . length ( );
    i ++ ) {
      for ( int j = 0;
      j <= s2 . length ( );
      j ++ ) {
        if ( dp [ i ] [ j ] ) {
          if ( j < s2 . length ( ) && ( toupper ( s1 [ i ] ) == s2 [ j ] ) ) dp [ i + 1 ] [ j + 1 ] = true;
          if ( ! isupper ( s1 [ i ] ) ) dp [ i + 1 ] [ j ] = true;
        }
      }
    }
    return ( dp [ n ] [ m ] );
  }