Clear c++ dp solution similar to the last matching problem
bool isMatch(string s, string p) {\n        int n1 = s.size(), n2 = p.size();\n        vector<vector<bool>> res(n1 + 1, vector<bool>(n2 + 1));\n        res[0][0
    bool isMatch(string s, string p) {\n        int n1 = s.size(), n2 = p.size();\n        vector<vector<bool>> res(n1 + 1, vector<bool>(n2 + 1));\n        res[0][0] = true;\n        for(int i=1; i<=n2; i++){\n            if(p[i-1] == '*')\n                res[0][i] = res[0][i-1];\n        }\n        for(int i=1; i<=n1; i++){\n            for(int j=1; j<=n2; j++){\n                if(p[j-1] != '*'){\n                    res[i][j] = (s[i-1] == p[j-1] || p[j-1] == '?') && res[i-1][j-1]; \n                }\n                else{\n                    res[i][j] = res[i-1][j] || res[i][j-1];\n                }\n            }\n        }\n        return res[n1][n2];\n    }
[]