Company: ge vernova_27sep
Difficulty: medium
Minimum Moves to Reach Last Stall Problem Description At the village fair, all the children have been asked to participate in a game. A certain number of stalls are arranged in a straight line. All the children start at the first stall, and the child who reaches the last stall earliest wins. At each stall, a token with an integer displaying which stall child can skip some stalls in between. If a token of 'X' is displayed at a stall, the child can skip go to any of the next 'X' stalls. At every stall the child visits, there is a wait time of five minutes, so the fewer stalls one visits, the more likely they are to win. Jaya, who was at the fair, was also to participate. Being very competitive, she wants to win desperately. Can you write a program to help her? The token numbers of the N stalls are given as an array A = [A 0 , A 1 , ..., A N-1 ]. Write a program to determine the minimum number of moves Jaya needs to reach the last stall from the first. Read input from STDIN and print the