Title Solving Josephus Problem
Catalog Type SLCItem
Persistent ID https://acos.cs.vt.edu/html/acos-pcex/acos-pcex-examples/py_queue_queue__664e500f91363872f0ba38d0?index=1
Platform Name PCEX
Features
Description Construct a program by using Queue structure to solve a Josephus problem. Josephus problem is a counting-out game. N people are in a circle, labeled as 1, 2, 3, … ,n. Given a skip number k, counting from the person labeled as 1, in every round, after k number of people are skipped, the next person will be counted out of the circle. Repeat the process with the remaining people until only one person remains. Then free the last one person. The program should return the last freed person.
Keywords
Author Mohammad Hassany
Institution University of Pittsburgh
Iframe URL https://acos.cs.vt.edu/html/acos-pcex/acos-pcex-examples/py_queue_queue__664e500f91363872f0ba38d0?index=1
Protocol SPLICE
Protocol URL
License MIT
Programming Language PYTHON
Natural Language en

Preview

SPLICE Output