You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Charles Reid
280fd9c3e0
|
6 years ago | |
---|---|---|
part2_8_4 | 6 years ago | |
part2_11_2 | 6 years ago | |
tex | 6 years ago | |
LICENSE | 6 years ago | |
Readme.md | 6 years ago | |
doubling.py | 6 years ago | |
josephus.py | 6 years ago |
Readme.md
Josephus Problem (Improved)
a.k.a., The Sushi Boat Problem
There are n plates of sushi on sushi boats. Each plate of sushi is labeled 1 to n and is arranged in a linked circle of sushi boats. The sushi boats move by in a small canal in front of you.
Beginning at plate 1, you count m plates of sushi, stopping at every mth plate to eat it. When you eat a plate of sushi, you remove the numbered plate from the boat.
In what order will the plates be stacked on our plate, starting with the top plate?