Swiggy
1 DSA problems asked in Swiggy coding interviews
1 Easy
0 Medium
0 Hard
All Categories
All
1 problem
Arrays & Hashing1
Minimum Value to Get Positive Step by Step Sum
Easy
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.