2/5 test cases have failed.
Are there any mistakes in the code, or didn’t I account for any cases?
Piyush and magical park
@mohitsethia at line 15 you are checking if s>=0 but it should s>=k since at every point his strength should be greater than k.
What if at a point s becomes less than k and there are consecutive stars by which value of s again increases.
It can’t be allowed, as soon as his strength goes below k he won’t be able to go further