Given n people seated in a circle and an integer k, eliminate every k-th person sequentially until only one person remains. Return the position of the last remaining person (Josephus problem).
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.