Wildcard Pattern Matching
medium
1. You are given two strings S1 and S2. S1 represents a text and S2 represents a wildcard pattern. 2. You have to print 'true' if the wildcard pattern is matched with the given text, otherwise print 'false'. The wildcard pattern can include the characters '?' and '*' '?' - matches any single character '*' - matches any sequence of characters (including the empty sequence)
Constraints
1 < length of strings S1 and S2 <= 200
Format
Input
2 strings S1 and S2
Output
Check the sample output and question video.
Example
Sample Input
baaabab
ba*a?
Sample Output
true
Question Video