Josephus Problem
Josephus Problem is a counting-out game studied by mathmaticians and computer scientists, the goal is to pick a certain person out of a group.
Problem Description
In this version of Josephus proplem, people are standing in a circle and they are numbered, starting at 1 and ending with 'n' number of people. Two numbers are drawn from a hat, the first is the person to start at, and the second the number to count before stopping on the next person to be removed from the circle. After being removed, the person is no longer counted, the game ends until there is only one person left.
Key Features
- The input file contains the number of people, the starting point, and the number of people to count by.
- The output return the order the people leave the circle, with the last number being the 'picked' person.
- This problem is solved using a Circular Singly Linked List.