Input [-1,-2] gives wrong answer to the solution provided in Kadane’s algorithm(Maximum subarray sum 3 video)
Incorrect solution
Hey @slow_motion, you can use this, implementation of kadane’s algorithm to deal with negative numbers as well.
Hope this helps.