Please tell why my code is not giving the correct output


here is the link please tell why my code is not giving the correct answer and send the corrected link

Pls go through the online video on wildcard pattern matching and then implement your solution accordingly as :