Wildcard patter matching

wrong answer is coming in the given test case. i am unable to find the bug.

@S19APP-PP0086 hey ayush your logic was bit wrong I have made some modification in your code
dp.