Problem 2799 · Medium
Find the shortest window from each start that holds every distinct value, then count all longer ends.
Open the interactive visualisation