You are given a text s and a pattern p. The pattern may have two special characters:
'?' matches exactly one character, any character.
'*' matches any run of characters, including an empty run.
Every other character in the pattern matches only itself. The pattern has to match the whole text, not just a part of it.
Return true if the pattern matches the whole text, and false if it does not.
Examples
Example 1:
Input: s = "cricket", p = "c*t"
Output: true
Explanation: "c" and "t" match the ends, and "*" matches "ricke".
Example 2:
Input: s = "delhi", p = "d*h"
Output: false
Explanation: The text ends with "i", but the pattern ends with "h", so the whole text is not matched.
Example 3:
Input: s = "mumbai", p = "m?m*"
Output: true
Explanation: "?" matches "u" and "*" matches "bai".