Suppose there are 100 people standing in a circle.

The first person has a gun in hand. What he has to do is shoot the second person and then pass the gun to the third person. Now, the third person kills the fourth person and gives gun to the fifth person.

This process is carried till there is only one person surviving.

Can you find out who survives at the end ?

The number **73** survives.

Consider the case when there are 2^n numbers in the circle. Each time the number reduces by half and the number 1 remains till the end.

In the given question, 1 kills 2, 3 kills 4 and so on till 71 kills 72. 36 people have been killed till now. 64 people remain in the circle. 64 is a power of 2.

So the first guy after 72 will be the new number 1 in a circle of 2^6. So 73 will survive.

—————

The solution is related to “Josephus problem” (Google it)