Can you tell my mistake?

Hi. Can u share the question link

you mean its link from youtube?

Ya I found the link. let me check the error in ur code


Check this solution. Hope it clears all ur doubts

this is the bottom up approach. I have tried it using top down approach but my answer is not coming

I have made changes in ur code. It is now working fine.
Hope ur doubt is cleared now.

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.