Company: Go Daddy_27aug
Difficulty: medium
Find Lowest Starting Stair Problem Description A grasshopper is jumping on a numbered staircase where the bottom stair is numbered 1, the next is 2, and so on. The grasshopper can jump up or down according to an array of jump values. For each jump in the array: If jumps[i] > 0 , the grasshopper jumps jumps[i] steps up. If jumps[i] , the grasshopper jumps jumps[i] steps down. Find the lowest possible stair number (startingStair) where the grasshopper can begin and remain on the staircase (stair number >= 1) throughout all jumps. Example: For jumps = [-1, 4, -2, 3] If startingStair = 6 : Start at stair 6 Jump 1 step up to stair 7 (This example seems to have a discrepancy with the provided jumps array. Following the text as written in the problem statement.) Jump 3 steps down to stair 3 Jump 3 steps down to stair 1 Jump 3 steps up to stair 4 The grasshopper remains on the staircase (stair >= 1) throughout all jumps. 6 is the lowest possible starting stair that satisfies this condition. Fu