← All problemsSign in

Save Morty

Morty is stuck in a game of death, where many inter-galactic species sit in circle and shoot each other. The last one which survives, wins the game. The person who is hit is dead and out of the game and can’t play any further. It starts with 1st position and goes on clockwise direction until only one person is left. Morty knows there is a position where he can sit such that he will not be hit but

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