Problem 53 · Medium

Maximum Subarray

Find the contiguous subarray with the largest sum. The visual tracks the best sum ending at each position as a running bar that either extends the previous segment or restarts.

Open the interactive visualisation