RETURN STATEMENT

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.

Hey @Par1hsharma
this comparison will take place another recursive call.
I would suggest you to make a call stack.