<awangdev>Wildcard Matching_1.java
public boolean isMatch(String s, String p) {
        if (s == null || p == null) return false;
        int m = s.length(), n = p.length();
        boolean[][] dp = new boolean[m + 1][n + 1];
        char[] ss = s.toCharArray();
        char[] pp = p.toCharArray();
        
        for (int i = 0; i <= m; i++) {
            for (int j = 0; j <= n; j++) {
                if (i == 0 && j == 0) {
                    dp[i][j] = true;
                    continue;
                }
                if (j == 0) { 
                    dp[i][j] = false;
                    continue;
                }
                dp[i][j] = false;
                if (pp[j - 1] != '*') {
                    if (i >= 1 && (ss[i - 1] == pp[j - 1] || pp[j - 1] == '?')) {
                        dp[i][j] |= dp[i - 1][j - 1];
                    }
                } else {
                    dp[i][j] |= dp[i][j - 1];
                    if (i >= 1) { 
                        dp[i][j] |= dp[i - 1][j]; 
                    }
                }
            }
        }
        return dp[m][n];
    }
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 ( ) , var_7 = var_3 . length ( ) ;
  boolean [ ] [ ] var_10 = new boolean [ var_6 + 1 ] [ var_7 + 1 ] ;
  char [ ] var_12 = var_2 . toCharArray ( ) ;
  char [ ] var_13 = var_3 . toCharArray ( ) ;
  for ( int var_15 = 0 ;
  var_15 <= var_6 ;
  var_15 ++ ) {
    for ( int var_16 = 0 ;
    var_16 <= var_7 ;
    var_16 ++ ) {
      if ( var_15 == 0 && var_16 == 0 ) {
        var_10 [ var_15 ] [ var_16 ] = true ;
        continue ;
      }
      if ( var_16 == 0 ) {
        var_10 [ var_15 ] [ var_16 ] = false ;
        continue ;
      }
      var_10 [ var_15 ] [ var_16 ] = false ;
      if ( var_13 [ var_16 - 1 ] != '*' ) {
        if ( var_15 >= 1 && ( var_12 [ var_15 - 1 ] == var_13 [ var_16 - 1 ] || var_13 [ var_16 - 1 ] == '?' ) ) {
          var_10 [ var_15 ] [ var_16 ] |= var_10 [ var_15 - 1 ] [ var_16 - 1 ] ;
        }
      }
      else {
        var_10 [ var_15 ] [ var_16 ] |= var_10 [ var_15 ] [ var_16 - 1 ] ;
        if ( var_15 >= 1 ) {
          var_10 [ var_15 ] [ var_16 ] |= var_10 [ var_15 - 1 ] [ var_16 ] ;
        }
      }
    }
  }
  return var_10 [ var_6 ] [ var_7 ] ;
}
