Wildcard pattern matching code


it is not passing all test cases…

Okay, so the code is fine. There is an issue with the testcase(memory constraint issues), please ignore this.