Pattern Matching
medium
1. You are given a string and a pattern. 2. You've to check if the string is of the same structure as pattern without using any regular expressions. Note -> Check out the question video and write the recursive code as it is intended without changing signature. The judge can't force you but intends you to teach a concept.
Constraints
1 <= length of str,ptr <= 20
Format
Input
A String str A pattern ptr
Output
Check the sample ouput and question video.
Example
Sample Input
graphtreesgraph
pep
Sample Output
p -> graph, e -> trees, .
Question Video