Leetcode 10. Regular Expression Matching
Determine whether a pattern p (with '.' matching any single character and '*' meaning zero or more of the preceding element) matches the entire string s. The core challenge is handling the branching choices introduced by '*' and overlapping subproblems, typically solved with recursion+memoization or dynamic programming.
Asked at:
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late January, 2026
Amazon
Mid-level
Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*' where: '.' Matches any single character.​​​​ '*' Matches zero or more of the preceding element. The matching should cover the entire input string (not partial).
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.