Algo++ : piyush and magical park

please explain at each step strength should be greater than k or 0 because in question it is written strength should be positive but in video it is said at every step strength should be greater than k . one more thing which value we have to print , if ans comes out yes. because in the given example maximum value of strength after a row will be 15 after 1st traversing 1st row

hi Aman

  1. check if the Strength is lower than the threshold viz, K, print β€œNo” and return.
  2. if the ans calculated at the end is greater then k(threshold value) then print β€œyes” and the ans calculated else print β€œno”
    you have to only print the answer at the end(after traversing the whole 2d matrix)

which ans we have to print because in the given example at the end of matrix strength left is 9 but 13 is printed in the example