Given an array where nums[i] is the maximum jump length from position i, return the minimum number of jumps to reach the last index. You can assume you can always reach the last index.
Input: An integer array.
Output: Integer — minimum jumps.
Input: [2,3,1,1,4]
Output: 2
Explanation: Jump 0->1->4.Input: [2,3,0,1,4]
Output: 2
Explanation: Jump 0->1->4.Input: [1]
Output: 0
Explanation: Already at end.1<=n<=10^40<=nums[i]<=1000