Skip to content

Program that solves Josephus problem using a circular, doubly linked list.

Notifications You must be signed in to change notification settings

zeljkolazic/Josephus-problem-circular-lists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Josephus problem

The program should read from the console window two numbers: the number of soldiers n and the number k skipped between successive executions. n should be at least 2, and k should be between 1 and n, inclusive. The program should then print out the execution order of the soldiers and the last soldier alive.

https://en.wikipedia.org/wiki/Josephus_problem

About

Program that solves Josephus problem using a circular, doubly linked list.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages