Given a string s and pattern p, return true only when the entire string matches the entire pattern. The pattern contains ordinary characters, ?, which matches any one character, and *, which matches any sequence of characters, including an empty sequence.
Examples
Input:["aa","a"]
Output:false
Input:["aa","*"]
Output:true
Hints
Let dp[i][j] mean the first i string characters match the first j pattern characters.
A star either consumes no string character or consumes the next string character.
Rolling two rows keeps the O(m*n) time algorithm at O(n) extra space.
Wildcard Pattern Matching
Determine whether a complete string matches a pattern containing question mark and star wildcards.