Lesson 5 of 10 · 20 min Premium

Maximum subarray

Find the largest sum of a run of neighbouring numbers in one pass with Kadane's algorithm.

This problem is part of Premium

Interview-style problems with tests that check the tricky cases, to get you ready for coding interviews.