Help


from Wikipedia
« »  
Each spot starts with three lives and each move reduces the total number of lives in the game by one ( two lives are lost at the ends of the line, but the new spot has one life ).
So at the end of the game there are 3n − m remaining lives.
Each surviving spot has only one life ( otherwise there would be another move joining that spot to itself ), so there are exactly 3n − m survivors.
There must be at least one survivor, namely the spot added in the final move.
So 3n − m ≥ 1 ; hence a game can last no more than 3n − 1 moves.

2.222 seconds.