Python DFS+memo, simple with comments
Simple DFS + memoization (via @cache), beats 70%\n\n\n    def isMatch(self, s: str, p: str) -> bool:\n        n, m = len(s), len(p)\n\n        # i is index in s
Simple DFS + memoization (via ```@cache```), beats 70%\n\n```\n    def isMatch(self, s: str, p: str) -> bool:\n        n, m = len(s), len(p)\n\n        # i is index in s, j is index in p\n        @cache\n        def dfs(i,j):\n            # reached both string and pattern ends - matched\n            if i >= n and j >= m:\n                return True\n\n            # reached pattern end but not string end - not matched\n            if j >= m:\n                return False\n\n            # match characters under i and j indexes (plus additional check whether we reached end of string), move both indexes forward\n            if i < n and (s[i] == p[j] or p[j] == "?"):\n                return dfs(i + 1, j + 1)\n\n            # for wildcard there are two options:\n            #   1) use it and move i forward (plus additional check whether we reached end of string)\n            #   2) do not use it and move j forward\n            if (p[j] == "*"):\n                return (i < n and dfs(i + 1, j)) or dfs(i, j + 1)\n\n            # no wildcard and not matched (or reached end of string before reaching end of pattern)\n            return False\n\n        return dfs(0,0)\n```
['Depth-First Search', 'Recursion', 'Memoization', 'Python']