Can the test case that is given in the question be explained in detail, I am unable to figure out how Piyush moves to the new row and which direction he moves in each row.
And what is finally expected in the output?
What does this mean “Assume that Piyush can shift immediately from last of one row to the start of next one without loss of any strength, help out Piyush to escape the park”.
Thanks in Advance !!