Comment body goes here.
Why it is not the following the path down->right->right->down as there we will get minimum initial health required in the above given example
Hope this helps incase you are still searching for it (though highly unlikely, still posting here to help :)The problem is to solve for the knight to have as minimum health requirement as possible in the intial step. In the case of yours, the minimum health requirement would be 18 because
intial step would remove 2 points
down-> removes 5 points
right-> removes 10 points
down-> gains 30
but to stay alive till this step, he needs to have at least 1 point before he takes this move. Therefore atleast 18 points are required( 2+5+10+1). Hope this helps!