Problem 2537 · Medium

Count the Number of Good Subarrays

Track equal index pairs in a sliding window and count every start that still holds at least k pairs.

Open the interactive visualisation