title: Check Possible Transform One String Another
signature: class Solution {
  
      public Boolean checkPossibleTransformOneStringAnother(String s1, String s2) {
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 ] );
  }
question_info.extension: java
question_info.entry_fn_name: checkPossibleTransformOneStringAnother
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": true, "inputs": {"s1": "daBcd", "s2": "ABC"}}, {"idx": 1, "outputs": false, "inputs": {"s1": "417514", "s2": "9"}}, {"idx": 2, "outputs": false, "inputs": {"s1": "010000", "s2": "1111011010"}}, {"idx": 3, "outputs": false, "inputs": {"s1": "ZcKYguiMrdyn", "s2": "iz"}}, {"idx": 4, "outputs": true, "inputs": {"s1": "argaju", "s2": "RAJ"}}, {"idx": 5, "outputs": false, "inputs": {"s1": "1110101101", "s2": "110101001"}}, {"idx": 6, "outputs": false, "inputs": {"s1": "ySOCoSaygi", "s2": "aRhxkYqh"}}, {"idx": 7, "outputs": false, "inputs": {"s1": "204", "s2": "6986871066"}}, {"idx": 8, "outputs": true, "inputs": {"s1": "10011100000010", "s2": "0"}}, {"idx": 9, "outputs": false, "inputs": {"s1": "nMAioozPmY", "s2": "WZFdDKw"}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(String s1, String s2, Boolean expected){
          try{
              Driver driver = new Driver();
              if (driver.run(s1, s2,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution("daBcd", "ABC", true);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution("417514", "9", false);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution("010000", "1111011010", false);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution("ZcKYguiMrdyn", "iz", false);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution("argaju", "RAJ", true);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution("1110101101", "110101001", false);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution("ySOCoSaygi", "aRhxkYqh", false);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution("204", "6986871066", false);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution("10011100000010", "0", true);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution("nMAioozPmY", "WZFdDKw", false);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(String s1, String s2, Boolean expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(s1, s2),expected);
      }
      
      public boolean validateSolution(Boolean actual, Boolean expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__