When ‘#’ encounters bhaiya put the break statement,
Then last if will not encounters which will simply decrement s by one.
So when # arrives it is going to the next line but it not decrementing by one.
Please Explain it??
Piyush and Magical park problem
If # is encountered, it means the row is blocked and he cannot move forward.
This means that he cannot move forward in that row, but he’ll move to the next row on encountering ‘#’.
Please refer this: