Title Solving Josephus Problem Challenge
Catalog Type SLCItem
Persistent ID https://adapt2.sis.pitt.edu/pcex/pcex_v2/index.html?lang=PYTHON&set=py_queue_queue&ch=queue_ch
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 Kamil Akhuseyinoglu
Institution University of Pittsburgh
Iframe URL https://adapt2.sis.pitt.edu/pcex/pcex_v2/index.html?lang=PYTHON&set=py_queue_queue&ch=queue_ch
Protocol PITT, HTML
Protocol URL
License MIT
Programming Language Python
Natural Language en

Preview