Problem 3859 · Hard

Count Subarrays With K Distinct Integers

A window counts when it has k values and none is short.

Open the interactive visualisation