Hi Guys,
I need your help to understand the below question. I'm not able to understand the problem statement it-self.
A CEO of a company wants to keep his employees happy. He can keep them happy if he has enough cookies in the pantry that are required at any time. The value at ith position indicates how much candies one person needs. A value Ci<0 means the employee needs cookies otherwise he keeps those cookies back in pantry.
Input: -5 4 2 -1 -6 -1 0 5
Output
8 (it should have been 7 but 8 was given so had to print ans+1 )
Source: https://leetcode.com/discuss/interview-experience/133715/Adobe-MTS-1