Company: Navi_IITD_1nov
Difficulty: medium
Debug the Fair Lane Hop Counter This is a debugging task. A program has already been written for you and is waiting in the editor. It compiles, it runs, and it prints an answer - but the answer is wrong, because the code contains a logical error. Your job is to find that error and rectify it so that every test passes. You may fix the given program in place, or ignore it entirely and write your own solution from scratch. Either is accepted. What you must not change is the input format or the output format described below. The problem A village fair sets out its stalls in one straight lane. The stalls are numbered 1 to N from one end of the lane to the other. You are standing at the first stall and you want to get to the last stall. Every stall carries a wooden token painted with a positive integer. Let A[i] be the number painted on the token at stall i . Standing at stall i , you may hop forward to any one of the next A[i] stalls - that is, to any stall i + 1 , i + 2 , ..., i + A[i] tha