← All problems
Regular Expression Matching
Match string against pattern with '.' and '*' (zero or more of preceding).
Complexity
Time O(mn), Space O(mn)
Common pitfalls
- Greedy '*' matching (fails)
- Exponential naive recursion
Your solution
Log in to save your code and track progress.