Problem 2113 · Medium

Elements in Array After Removing and Replacing Elements

Work out the array at any second of a repeating remove-then-restore cycle, then read the index each query asks for.

Open the interactive visualisation