Problem 2607 · Medium
Circular array: split indices into gcd(n, k) cycles and make each cycle equal to its median.
Open the interactive visualisation