Description: Numbered 1,2,3, ..., n, n individuals under the direction of the order of sitting around a round table next to the pin, holding the hands of each person
A password (positive integer). First, enter a positive integer as the number of reported upper limit of m, then, from the first person to embark on the order of pin direction from a starting sequence reported that the number of people leaving the table to report m, and the password in his hand as a new m value, from the Under the direction of the order of one pin on the people sit at the table began to re-reported from a few, and so on, until all leave the table until everyone.
Algorithm idea:
Linked list with one-cycle to solve this problem, the methods to achieve the first node to define linked lists, single cycle nodes linked list structure and the general structure of a single linked list of nodes are identical, only the data field with an integer to represent then they are the formation of a single round-robin list. Next, f
To Search:
File list (Check if you may need any files):
Joseph.cpp