Array element
Current scan
Current subarray
Max subarray

Controls

Time: O(n) | Space: O(1)

Steps

0 steps

Press Run to trace the algorithm one step at a time.