Problem: 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).
Can anyone help me with this ?
i tried two pointers and it failed, then I looked at the solution. It was DP but I could not get the idea on how to think and understand that, Can anyone explain in easiest words to me please ?
Thanks
Spoiler