value of string is not changing, it is constant i.e 20 (which was passed while calling)
Piyush and Magical Park
Hello @vipin.kumar,
Logically there are many issues in your program:
-
Try to correct the input format.
//To understand this better, print the array. -
You have not consider the following points:
2.1. When there is no more strength left to move further
2.2. When you go from last column o next row
I have corrected it for point 2:
Now, your task is correct it for point 1.
Hope, this would help.
Give a like if you are satisfied.
1 Like
corrected the input problem and now it is working fine. thank you.