Problem 4048 · Medium

Count Values With Equally Spaced Occurrences I

Gather each value’s indices; a value with exactly three hits counts when its two gaps match.

Open the interactive visualisation