D. E. Shaw India interview question

Josephus problem