TSC3.13收到批准通知3.20通知寄卡# EB23 - 劳工卡
t*a
1 楼
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).
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
Given two sets of strings A and B,
Problem 1:
to find out a wildcard pattern w. w can match all strings in A but none
string in B. it w doesn't exist, return false.
Problem 2:
to find a group of wildcard pattern W={w_i}, W can match all strings in A
but none string in B. Minimize the size of W.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover the entire input string (not partial).
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
Given two sets of strings A and B,
Problem 1:
to find out a wildcard pattern w. w can match all strings in A but none
string in B. it w doesn't exist, return false.
Problem 2:
to find a group of wildcard pattern W={w_i}, W can match all strings in A
but none string in B. Minimize the size of W.