Jump Game II

You are given an array where each element represents the maximum jump length from that position. Return the minimum number of jumps required to reach the last index. The test cases guarantee that the last index is always reachable.

Examples
Input: [2,3,1,1,4]
Output: 2
Hints

Jump Game II

You are given an array where each element represents the maximum jump length from that position. Return the minimum number of jumps required to reach the last index. The test cases guarantee that the last index is always reachable.