Marks :10
: 2 | : 0
Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*' where:
'?' Matches any single character.
'*' Matches any sequence of characters. ( zero or more )
The matching should cover the entire input string.
First line contains a single string corresponding to 's'.
Second line contains a single string corresponding to 'p'.
Constraints
$$$ 1 \le |s| \le 2000 $$$
$$$ 1 \le |p| \le 2000 $$$
Print either "YES" or "NO"
cb ?a
NO
abzzzc a*b*c
YES
Input 1
'?' matches 'c', but the second letter is 'a', which does not match 'b'.
Input 2
The pattern matches perfectly where *1 = " and *2 = 'zzz'
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.