private boolean isWildcardMatchDP(String s, String p) {
        boolean[][] A = new boolean[p.length() + 1][s.length() + 1];
        A[0][0] = true;
        for (int i = 1; i < p.length(); i++) {
            if (p.charAt(i - 1) == '*')
                A[i][0] = A[i - 1][0];
        }

        for (int i = 0; i < p.length(); i++) {
            for (int j = 0; j < s.length(); j++) {
                if (s.charAt(j) == p.charAt(i) || p.charAt(i) == '?') {
                    A[i + 1][j + 1] = A[i][j];
                } else if (p.charAt(i) == '*') {
                    A[i + 1][j + 1] = A[i][j] || A[i + 1][j] || A[i][j + 1];
                } else {
                    A[i + 1][j + 1] = false;
                }
            }
        }

        return A[p.length()][s.length()];
    }