Question: Problem statement Given a text and a wildcard pattern of size N and M respectively, implement a wildcard pattern matching algorithm that finds if the

Problem statement
Given a text and a wildcard pattern of size N and M respectively, implement a
wildcard pattern matching algorithm that finds if the wildcard pattern is
matched with the text. The matching should cover the entire text not partial text.
The wildcard pattern can include the characters '?' and '*'
'?'- matches any single character
*- Matches any sequence of characters(sequence can be of length 0 or more)
Detailed explanation ( Input/output format, Notes, Images )
Input Format:
The first line contains an Integer 'T' which denotes the number of test
cases/queries to be run.
Then the test cases follow.
The first line of input for each test case/query contains a string representing the
wildcard pattern.
The second line of input for each test case/query contains a string representing
the text.
Output Format:
For each test case, print 'True' if the text matches the pattern, print 'False'
otherwise(without quotes).
Output for every test case will be printed in a separate line.
t=(input())
while t>0 :
pattern=input ()
text=input ()
print(wildcardMatching(pattern,text))
t-=1
 Problem statement Given a text and a wildcard pattern of size

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!