1413. Minimum Value to Get Positive Step by Step Sum
https://leetcode.com/problems/minimum-value-to-get-positive-step-by-step-sum
Description
Given an array of integers nums
, you start with an initial positive value startValue*.*
In each iteration, you calculate the step by step sum of startValue plus elements in nums
(from left to right).
Return the minimum positive value of startValue such that the step by step sum is never less than 1.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= nums.length <= 100
-100 <= nums[i] <= 100
ac
Previous1412. Find the Quiet Students in All ExamsNext1414. Find the Minimum Number of Fibonacci Numbers Whose Sum Is K
Last updated