Piyush and the magical park problem


What is the problem in this code?
I am getting wrong output for the sample input.

hey ashish, make some changes on your code.

  1. your array should be of char type not integer as it has characters like * and.
  2. getting # only means that you cannot move on rightside as there is block but you can move to next row. So change this break and move to next value of i.
  3. You are printing final strength even piyush not able to escape but you have to print strength only if he is able to escape. i.e. print strength only with yes not with no.