Where am i going wrong?

Could you help me figure out what is wrong here ?

your submissions show you have scored 100! great job
if this solves your doubt please mark it as resolved :slight_smile:

Yeah actually through recursion I am able to solve it, but when i tried solving thorugh queue, with same approach, i am not able to solve. Could you help me in that?