Sir you said we need to put RETURN statement in 2nd base case i.e if(si==li) to stop statement wriiten below to execute but where will the comparison take place if we dont want below statements to be executed again.
RETURN STATEMENT
Hey @Par1hsharma
this comparison will take place another recursive call.
I would suggest you to make a call stack.