**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 summary="Spoiler">↵
Tagging the smartest people I know here : ↵
</spoiler>↵
↵
[user:gholyo,2024-09-09] [user:attractors,2024-09-09] [user:1.618034,2024-09-09] [user:123gjweq2,2024-09-09]
↵
**'.' 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 summary="Spoiler">↵
Tagging the smartest people I know here : ↵
</spoiler>↵
↵
[user:gholyo,2024-09-09] [user:attractors,2024-09-09] [user:1.618034,2024-09-09] [user:123gjweq2,2024-09-09]