Skip to content

A circular doubly-linked list implementation. Used to solve the Josephus problem.

Notifications You must be signed in to change notification settings

tfpf/circular-doubly-linked-list-josephus-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Circular Doubly-Linked List

CDLListNode.c and CDLList.c provide an implementation of a circular doubly-linked list of integers. These are used to solve the Josephus problem.

Josephus Problem

There are 100 people standing in a circle. Every third person is eliminated. (In other words, the people at positions 3, 6, 9, and so on are eliminated.) This continues till there's only one person left. Who will win this game? Run

make

and then

./josephus 100 3

to find out.

Note

I do not condone violence.

About

A circular doubly-linked list implementation. Used to solve the Josephus problem.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published