I could not solve all cases please correct and comment my code

hi @akshat1409 for loop will go till len not len-1