GeeksforGeeks » Interview Questions
Wildcard pattern matching
(1 post)-
Allowed wildcard: '*' [0..many]
Return true if the pattern matches the given string input.Constraints: Pattern always starts and ends with a minimum one *
Ex-1:
Pattern: *A*
Source String: ABC
Return: TrueEx-2:
Pattern: *AX*
Source String: ABC
Return: FalseEx-3:
Pattern: *A*BBBB*
Source String: ABBBDBBBEBBBFBBBB
Return: TrueEx-4:
Pattern: *A*BBBB*X*
Source String: 123A213SWBB3sBBBB323X
Return: True
Reply
You must log in to post.