Updated 11 May 2020
N people standing in a circle. 1st person has a sword. He kills the next person (i.e. No. 2) and gives the sword to the next (i.e. No. 3). All people do the same until only one of them survives. Which number survives at the last?
Two alternative solutions are provided here.
Arpan Gayen (2020). MathExample(N person standing in a circle with only 1 sword) (https://www.mathworks.com/matlabcentral/fileexchange/75475-mathexample-n-person-standing-in-a-circle-with-only-1-sword), MATLAB Central File Exchange. Retrieved .