← All problemsSign in

Candy Rush

K children are sitting in a circular fashion. The children are numbered from 1 to K in clockwise order. Each of them has a card with an integer (non-zero) on it. The game starts from the Nth child, who tells the integer on the card and jumps out of the circle. Let I denote that integer. If I is positive, Ith child to the left will be next to jump. If I is negative, Ith child to the right will be

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