jump = function (nums) {
    let [ left, right, jumps ] = [ 0, 0, 0 ];

    while (right < nums.length - 1) {
        const maxReach = getMaxReach(nums, left, right);

        left = right + 1;
        right = maxReach;
        jumps += 1;
    }

    return jumps;
}
https://leetcode.com/problems/jump-game-ii/
Time O(N) | Space O(1)
@param {number[]} nums
@return {number}