Josephus Problem

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

Source Code All Projects