Given an array nums. We define a running sum of an array as runningSum[i] = sum(nums[0]…nums[i]). Return the running sum of nums. Explanation: Running sum is ...
If cell i+1 contains a zero, you can walk to cell i+1. If cell i+leap contains a zero, you can jump to cell i+leap. If you're standing in cell n-1 or the value of i+leap>=n, you can walk or jump off ...