Problem - Regex Matching

LC 10 - dot and star patterns

Given string ss and pattern pp, implement regex matching. '.' matches any single character. '*' matches zero or more of the preceding element.

Example: s = "aab", p = "cab" matches. The 'c*' matches zero 'c's, 'a*' matches two 'a's, 'b' matches 'b'.