237. Wildcard Pattern Matching
Hard · Dynamic Programming
Given an input string `s` and a pattern `p`, implement wildcard pattern matching with support for `?` (matches any single character) and `*` (matches any sequence of characters, including empty).
Examples
Example 1 Input: s="adceb", p="*a*b" Output: true Explanation: * matches empty, a matches a, * matches dce, b matches b
Example 2 Input: s="acdcb", p="a*c?b" Output: false
Constraints
- 0 ≤ s.length ≤ 2000, 0 ≤ p.length ≤ 2000