当前位置: 代码迷 >> 综合 >> [LeetCode] 134: Wildcard Matching
  详细解决方案

[LeetCode] 134: Wildcard Matching

热度:52   发布时间:2023-12-09 05:45:21.0
[Problem]

Implement wildcard pattern matching with support for '?' and '*'.

'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).The matching should cover the entire input string (not partial).The function prototype should be:
bool isMatch(const char *s, const char *p)Some examples:
isMatch("aa","a") → false
isMatch("aa","aa") → true
isMatch("aaa","aa") → false
isMatch("aa", "*") → true
isMatch("aa", "a*") → true
isMatch("ab", "?*") → true
isMatch("aab", "c*a*b") → false

[Solution]

wait a moment

说明:版权所有,转载请注明出处。 Coder007的博客