Wildcard Matching
Given an input string s and a pattern p, implement wildcard pattern matching with support for two special wildcard characters:
?matches exactly one arbitrary character.*matches any sequence of characters, including the empty sequence.
Return true if the pattern p matches the entire string s; otherwise, return false.
The matching must cover the entire input string, not just a substring.
Example 1
Input
s = "aa", p = "a"Output
falseThe pattern
a matches only a single a, so it cannot match the entire string aa.Example 2
Input
s = "aa", p = "*"Output
trueThe
* wildcard can match the entire string aa.Constraints
- 0 <= s.length, p.length <= 2000
- s contains only lowercase English letters
- p contains only lowercase English letters, '?' or '*'