We should also do s-- if piyush encounters # but we are breaking the loop in else so how this is giving correct results

we should also do s-- if piyush encounters # but we are breaking the loop in else so, how this is giving correct results

@hssharma2212000 if piyush encounters # he won’t go to that place means he never take a step for that hence no need to do s-- in that case.