Problem 2831 · Medium

Find the Longest Equal Subarray

For each value, slide a window over its positions and keep the window whose gaps hold at most k deletions.

Open the interactive visualisation