Approach hintTry it first, then revealHide
After the first removal the remaining friends play the same game with n - 1 players, only relabelled. Express the winner for n in terms of the winner for n - 1 to get an O(n) recurrence.
After the first removal the remaining friends play the same game with n - 1 players, only relabelled. Express the winner for n in terms of the winner for n - 1 to get an O(n) recurrence.