comefrom: <awangdev>Wildcard Matching_2.java
code: public boolean isMatch(String s, String p) {
          if (s == null || p == null) {
              return false;
          }
          int m = s.length();
          int n = p.length();
          boolean[][] dp = new boolean[2][n + 1];
          char[] ss = s.toCharArray();
          char[] pp = p.toCharArray();
          int curr = 0;
          int prev = 1;
          
          
          for (int i = 0; i <= m; i++) {
              prev = curr;
              curr = 1 - prev;
              for (int j = 0; j <= n; j++) {
                  if (i == 0 && j == 0) {
                      dp[curr][j] = true;
                      continue;
                  }
                  if (j == 0) { 
                      dp[curr][j] = false;
                      continue;
                  }
                  dp[curr][j] = false;
                  if (pp[j - 1] != '*') {
                      if (i >= 1 && (ss[i - 1] == pp[j - 1] || pp[j - 1] == '?')) {
                          dp[curr][j] = dp[prev][j - 1];
                      }
                  } else {
                      dp[curr][j] |= dp[curr][j - 1];
                      if (i >= 1) { 
                          dp[curr][j] |= dp[prev][j]; 
                      }
                  }
              }
          }
          return dp[curr][n];
      }
masked: public boolean var_0 ( String var_1 , String var_2 ) {
    if ( var_1 == null || var_2 == null ) {
      return false ;
    }
    int var_3 = var_1 . length ( ) ;
    int var_4 = var_2 . length ( ) ;
    boolean [ ] [ ] var_5 = new boolean [ 2 ] [ var_4 + 1 ] ;
    char [ ] var_6 = var_1 . toCharArray ( ) ;
    char [ ] var_7 = var_2 . toCharArray ( ) ;
    int var_8 = 0 ;
    int var_9 = 1 ;
    for ( int var_10 = 0 ;
    var_10 <= var_3 ;
    var_10 ++ ) {
      var_9 = var_8 ;
      var_8 = 1 - var_9 ;
      for ( int var_11 = 0 ;
      var_11 <= var_4 ;
      var_11 ++ ) {
        if ( var_10 == 0 && var_11 == 0 ) {
          var_5 [ var_8 ] [ var_11 ] = true ;
          continue ;
        }
        if ( var_11 == 0 ) {
          var_5 [ var_8 ] [ var_11 ] = false ;
          continue ;
        }
        var_5 [ var_8 ] [ var_11 ] = false ;
        if ( var_7 [ var_11 - 1 ] != '*' ) {
          if ( var_10 >= 1 && ( var_6 [ var_10 - 1 ] == var_7 [ var_11 - 1 ] || var_7 [ var_11 - 1 ] == '?' ) ) {
            var_5 [ var_8 ] [ var_11 ] = var_5 [ var_9 ] [ var_11 - 1 ] ;
          }
        }
        else {
          var_5 [ var_8 ] [ var_11 ] |= var_5 [ var_8 ] [ var_11 - 1 ] ;
          if ( var_10 >= 1 ) {
            var_5 [ var_8 ] [ var_11 ] |= var_5 [ var_9 ] [ var_11 ] ;
          }
        }
      }
    }
    return var_5 [ var_8 ] [ var_4 ] ;
  }
  