Description: Joseph problem - typical application of circular list
N people form a circle. First, the first person counts clockwise from 1,
Report to the m person and order him to be listed. Then start from the next person and report clockwise from 1
To the m person, and then make it out And so on, find the order of the columns.
Solution: assume M = 3, n = 8 (1 23 4 5 6 7 8)
Results: 3 61 52 8 4 7
To Search:
File list (Check if you may need any files):
Filename | Size | Date |
---|
约瑟夫问题-循环链表典型应用.cpp | 2898 | 2020-01-02 |