Hundred people in a circle with a sword

product-puzzle case · difficulty 3/5 · 15 minutes · other

Prompt

100 people stand in a circle, numbered 1 to 100. Person 1 holds a sword, kills person 2 and passes the sword to person 3. Person 3 kills person 4 and passes the sword to person 5, and so on around the circle. This continues until one person is left. Who survives?

Context

A classic interview puzzle. Core idea: Josephus Problem. Highest power of 2 < 100 is 64. Remaining = 36. Formula: 2(L) + 1. Talk through your reasoning; the interviewer cares as much about structure as about the answer.

Clarifying questions

Is it a power of 2?
Yes. Each holder kills the next person still alive and passes the sword to the next after that, going around the circle until only one person remains. The number of people is not a power of 2, but the pattern for powers of 2 is the key.

Recommendation

**Answer:** Person 73 survives, which is 2 × 36 + 1. **Why:** After the first 36 kills the circle has exactly 64 people, a power of 2, and in such a circle the person holding the sword always survives.

Risks

Next steps