Back to DSA
Wildcard Matching
hardImplement a pattern matcher where '?' stands for any single character and '*' stands for any sequence of characters (including none). The entire input string must be matched by the pattern.
Examples
Example 1:
Input:
s = "sequence", p = "s*nce"Output:
trueExplanation: '*' absorbs 'eque', and the remaining characters match literally.
Example 2:
Input:
s = "test", p = "te?a"Output:
falseExplanation: '?' matches 's' but 'a' does not match 't'.
Hints
1234567