Maximum SubArray sum Kadane's

Will kadane’s algorithm work for arrays with only negative integers? Supposedly the sum never turns 0 then? The maximum sum has to be negative but according to this algorithm, sum will always be 0 or greater than 0

@mitaali.nagpal09 hey mitaali the kadane algorithm also work for negative array it need some modification
there is so many application of kadane algorithm and you’re asking one of them. you can refer this.
if any queries comes please feel free to ask

Hey Mitaali,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.