[Py3/Py] Simple solution using recursion w/ comments
\nfrom functools import cache\n\nclass Solution:\n    def isMatch(self, s: str, p: str) -> bool:\n       \n        # Init\n        n = len(s)\n        m = len(p
```\nfrom functools import cache\n\nclass Solution:\n    def isMatch(self, s: str, p: str) -> bool:\n       \n        # Init\n        n = len(s)\n        m = len(p)\n       \n        @cache # memoization\n        def match(s_idx, p_idx) -> bool:\n            \n            # Wait for pattern to be exhausted\n            if p_idx == m:\n                return s_idx == n # string must be exhausted if it matches the pattern\n            \n            elif s_idx > n: # if string is exhausted before pattern is exhausted, return False\n                return False\n            \n            else: # for all other scenarios\n                \n                # see if string matches the current pattern\n                matched = ((s_idx < n) and (s[s_idx] == p[p_idx])) or (p[p_idx] in ["*", "?"])\n                \n                # if nothing matches, return false\n                if not matched:\n                    return False\n                \n                else: # in case of a match\n                    \n                    # check if pattern has "*"\n                    if p[p_idx] == "*":\n                        return (match(s_idx+1, p_idx) or # increment string index and stay at same pattern index\n                                match(s_idx+1,p_idx+1) or # increment both string and patter index\n                                match(s_idx, p_idx+1)) # increment pattern index and stay at the same string index\n                    \n                    else: # if pattern doesn\'t have "*", then it either have "?" or same char as string\n                        return match(s_idx+1, p_idx+1) # increment both string and pattern index\n        \n        return match(0,0)\n```
['Memoization', 'Python', 'Python3']