deno.land / x / masx200_leetcode_test@10.6.5 / minimum-value-to-get-positive-step-by-step-sum / index.ts
1234567891011function minStartValue(nums: number[]): number { let presum = 0; let ans = 1; for (const num of nums) { presum += num; ans = Math.max(ans, 1 - presum); } return ans;}export default minStartValue;
Version Info