I am not able to identfy where i am doing wrong in this recursive code

hello @anshulgurawalia

check now->

at some places u have written last index incorreclty