Tag Archives: Execution

Problem: There are N prisoners standing in a circle, waiting to be executed…

By | June 27, 2023

There are N prisoners standing in a circle, waiting to be executed. The executions are carried out starting with the kth person, and removing every successive kth person going clockwise until there is no one left. Given N and k, write an algorithm to determine where a prisoner should stand in order to be the… Read More »