MCPcopy Create free account
hub / github.com/akzare/Algorithms / josephus

Method josephus

src/main/cpp/algorithms/dp/JosephusProblem.h:40–44  ·  view source on GitHub ↗

Suppose there are n people in a circle and person 0 kill the k'th person, then the k'th person kills the 2k'th person and so on until only one person remains. The question is who lives? Let n be the number of people and k the hop size

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected