Java DP Accepted
public class Solution {\n        public boolean isMatch(String s, String p) {\n            int m = s.length(), n = p.length();\n            char[] ws = s.toChar
    public class Solution {\n        public boolean isMatch(String s, String p) {\n            int m = s.length(), n = p.length();\n            char[] ws = s.toCharArray();\n            char[] wp = p.toCharArray();\n            boolean[][] dp = new boolean[m+1][n+1];\n            dp[0][0] = true;\n            for (int j = 1; j <= n; j++)\n                dp[0][j] = dp[0][j-1] && wp[j-1] == '*';\n            for (int i = 1; i <= m; i++)\n                dp[i][0] = false;\n            for (int i = 1; i <= m; i++) {\n                for (int j = 1; j <= n; j++) {\n                \tif (wp[j-1] == '?' || ws[i-1] == wp[j-1])\n                \t\tdp[i][j] = dp[i-1][j-1];\n                \telse if (wp[j-1] == '*')\n                \t\tdp[i][j] = dp[i-1][j] || dp[i][j-1];\n                }\n            }\n            return dp[m][n];\n        }\n    }
[]