Problem 4033 · Medium

Valid K-Unique Subarrays I

For each range, count the values inside it: the range is valid when there are exactly k distinct values and every count is even.

Open the interactive visualisation