What will be the minimum number of jumps required to reach the end of the array arr[] ={0,1,3,6,3,6,8,5}?

Lượng Tiger

New member
What will be the minimum number of jumps required to reach the end of the array arr[] ={0,1,3,6,3,6,8,5}?
A. 1
B. 2
C. 3
D. not possible to reach the end
 
Answer: D
Explanation: Each element of the array represents the maximum number of steps that can be taken forward from that element. So as the first element here is 0 so we cannot move any further from the first element. Thus, it is not possible to reach the end of the array.
 

Tìm kiếm

Back
Top