CDLListNode.c
and CDLList.c
provide an implementation of a circular
doubly-linked list of integers. These are used to solve the 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.
I do not condone violence.