项目作者: beingmartinbmc

项目描述 :
Simulating a game using Circular Doubly Linked List. Refer to the README for more info.
高级语言: C++
项目地址: git://github.com/beingmartinbmc/Simulating-a-Game.git
创建时间: 2018-04-08T20:52:01Z
项目社区:https://github.com/beingmartinbmc/Simulating-a-Game

开源协议:

下载


Simulate a game, using two circular doubly linked list. The game involves a number of children. The children whose names are on lines numbered by prime numbers should be placed on the first list, and the others on the second list. Starting with the child whose name is on the line in the middle (or ⌊numberOfChildren/2⌋) of the second list, children on that list are counted clockwise. Every mth child, where m is the number of elements in the first list is eliminated from that list. Counting goes on with the next child. Repeat this counting m times or till the second list gets empty. Your program should output the initial lists and the final second list.