题目内容
Given an input string (s
) and a pattern (p
), implement wildcard pattern matching with support for '?'
and '*'
.
两个字符串,S作为被匹配的字符串,P作为匹配字符串
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
其中P中有两个特殊元素'?'和'*',分别可以与任意1个字符匹配和与0-N个字符匹配
The matching should cover the entire input string (not partial).
Note:
s
could be empty and contains only lowercase lettersa-z
.p
could be empty and contains only lowercase lettersa