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_2 , String var_3 ) {
    if ( var_2 == null || var_3 == null ) {
      return false ;
    }
    int var_6 = var_2 . length ( ) ;
    int var_7 = var_3 . length ( ) ;
    boolean [ ] [ ] var_11 = new boolean [ 2 ] [ var_7 + 1 ] ;
    char [ ] var_13 = var_2 . toCharArray ( ) ;
    char [ ] var_14 = var_3 . toCharArray ( ) ;
    int var_16 = 0 ;
    int var_17 = 1 ;
    for ( int var_18 = 0 ;
    var_18 <= var_6 ;
    var_18 ++ ) {
      var_17 = var_16 ;
      var_16 = 1 - var_17 ;
      for ( int var_19 = 0 ;
      var_19 <= var_7 ;
      var_19 ++ ) {
        if ( var_18 == 0 && var_19 == 0 ) {
          var_11 [ var_16 ] [ var_19 ] = true ;
          continue ;
        }
        if ( var_19 == 0 ) {
          var_11 [ var_16 ] [ var_19 ] = false ;
          continue ;
        }
        var_11 [ var_16 ] [ var_19 ] = false ;
        if ( var_14 [ var_19 - 1 ] != '*' ) {
          if ( var_18 >= 1 && ( var_13 [ var_18 - 1 ] == var_14 [ var_19 - 1 ] || var_14 [ var_19 - 1 ] == '?' ) ) {
            var_11 [ var_16 ] [ var_19 ] = var_11 [ var_17 ] [ var_19 - 1 ] ;
          }
        }
        else {
          var_11 [ var_16 ] [ var_19 ] |= var_11 [ var_16 ] [ var_19 - 1 ] ;
          if ( var_18 >= 1 ) {
            var_11 [ var_16 ] [ var_19 ] |= var_11 [ var_17 ] [ var_19 ] ;
          }
        }
      }
    }
    return var_11 [ var_16 ] [ var_7 ] ;
  }
  