Test Cases Problem

I think there is problem with submission with same code on leetcode got accepted but here it is giving problem.

Hello Vikram, I hope you didn’t understand the ques properly, pls understand the ques properly your code seems like you are considering this as wildcard matching problem, where * takes any character but in case of regex matching * means the element that is before this.
I mean that in case of wildcard matching :
Input :
aa *
Output :
1
And in case of regex matching :
Input :
aa *
Output :
0
As here * is there and before there it has nothing so no character matching will be there.
In case of wildcard matching if b* is given to you then it can match anything like ba,bc,basf,bvgb but in case of regex matching we only consider b* as b, bb, bbb, bbbb

I hope it is clear to you. In case it is clear to you pls mark it as resolve and provide the rating as well as feedback so that we can improve ourselves.
In case there is still some confusion pls let me know, I will surely try to help you out.
Thanks :slight_smile:
Happy Coding !!