Problem 2461 · Medium

Maximum Sum of Distinct Subarrays With Length K

Find the maximum sum of a length-k subarray with all distinct values.

Open the interactive visualisation