Course · Section 11: Working With Arrays · Lecture 149: Simple Array Methods
Implement `maxSubArray(nums)` returning the largest sum of any contiguous subarray (Kadane's algorithm).
+ 1 hidden test run on Submit.
Kadane keeps the best sum ending at each index, resetting when extending hurts, and tracks the global best.
Run your code to see results.