10. Regular Expression Matching
Problem:
'.' Matches any single character.
'*' Matches zero or more of the preceding element.Input:
s = "aa"
p = "a"
Output: false
Explanation: "a" does not match the entire string "aa".Input:
s = "aa"
p = "a*"
Output: true
Explanation: '*' means zero or more of the precedeng element, 'a'. Therefore, by repeating 'a' once, it becomes "aa".Solution:
ONE
TWO
Last updated