Removal of every 'kth' person from a circle. Find the last remaining person
问题 As part of a recent job application I was asked to code a solution to this problem. Given, n = number of people standing in a circle. k = number of people to count over each time Each person is given a unique (incrementing) id. Starting with the first person (the lowest id), they begin counting from 1 to k. The person at k is then removed and the circle closes up. The next remaining person (following the eliminated person) resumes counting at 1. This process repeats until only one person is