Skip to content

shanedwilson/JosephusProblem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JosephusProblem

This was an exercise for NSS C#/.Net backend.

At some point there was a war, and during one of its battles defendants were blocked by attackers in the cave. To avoid capture they decided to stand in a circle and kill each third until only one person remained. That person was supposed to commit suicide. He eventually decided to just surrender. Apparently this is a real thing that happened and the guy's name was Josephus.

Your task is to write a method called LastPersonStanding that, for a given number of people numberOfPeople and killing interval killingInterval, determines the position of the person who remains alive... the Josephus position.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages