Wildcard Pattern Matching

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)
Input Format
2 strings S1 and S2
Output Format
Check the sample output and question video.
Question Video
Constraints
1 < length of strings S1 and S2 <= 200
Sample Input
baaabab
ba*a?
Sample Output
true


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name