Kadane's Algorithm ·
Maximum Subarray
un
seel
.com · One pass · O(n) time · O(1) space
Sum here
0
Best so far
0
State
—
Positive element
Negative element
Running window
Best subarray
▶ Play
←
→
Unmute
Reset
Un
seel
.com · Kadane's Algorithm