What is wrong with my code

i ddin’t understand why it is showing tle…and wrong answer …because i have applied same approach which was told by prateek bhaiya

@Gaurav_dev if your right path exist don’t check for left just return true.

bro if you can make changes in my code …and comment the affect of change will be a great help

look at this code here i have updated and commented that part

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.