Problem 1695 · Medium

Maximum Erasure Value

Find the largest sum of a contiguous run with no repeated values. The visual slides a window that grows at the right and shrinks from the left when a duplicate appears.

Open the interactive visualisation