I have passed all the test cases except for one, kindly review my code.
my code:
One test case not passing
see if the column is not last only then your strength decreases by 1 while moving from 1 column to next column.
but that’s the pointer for the question that if he jumps to the next row then no energy will be lost
see this: