All submissions for this problem are available.
Stepping Stones is a very famous game in Jamia Millia Islamia.
Given N number of milestones where each number written on the milestone represents the maximum number of steps that can be made from it.
Lebron James wants to reach the last milestone or beyond in minimum no of steps if he starts from the first milestone.
The first line contains T representing the number of test cases.
Every test case contains the following:
The first line is N the number of milestones.
The next line conatins number written on each milestone A[1....N].
Give the minimum no of jumps required by lebron to reach the last milestone.
- 1 ≤ T ≤ 50
- 1<= N <= 1000
- 1<= A[i] <= 10000
Input: 1 5 1 2 3 4 5 Output: 3
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions