Regular Expression Matching
Explore how to implement regular expression matching where the pattern includes special characters '.' and '*', which match any single character and zero or more of the preceding character respectively. Understand constraints and apply dynamic programming approaches like memoization or tabulation to cover the entire input string effectively. This lesson helps you develop a clear strategy for solving pattern matching questions seen in technical interviews.
We'll cover the following...
Statement
You are given an input string, s, and a pattern string, p. Your task is to implement regular expression matching between s and p, where the pattern may include the special characters '.' and '*':
'.'matches any single character.'*'matches zero or more occurrences of the preceding character.
The match must cover the entire input string, not just part of it.
Constraints:
...