← All problemsSign in

Rotating Children

There are $N$ children, each having their own random number, standing in a line and playing a game. With each successive turn, the line rotates, the child at last comes at first, first at second and so on. (A[N] $-$> A[1], A[1] $-$> A[2] ...) You are provided with a non negative Integer $K$. Output the sequence, as it would be after K successive turns. ### Input - First line will contain $T$, n

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start