Pregunta de entrevista de NVIDIA

How would you solve the Josephus problem.