Here is the question:
There are 100 person ( lets name them 1 to 100 ) whos task is to eliminate the next person to them and pass the killing tool to the next person alive.
Example:
1 must eliminate person 2 and pass the killing tool to the person 3 and so on.
The problem is, I must find the last person that is alive.
Now I want to solve the problem above using formula instead of array. The solution I thought is something like this.
I used Array of boolean
the loop them while flagging the next index to false. Then looping again to find which item is remained true.
Thanks in advance