Skip to content

Latest commit

 

History

History
8 lines (7 loc) · 297 Bytes

circular_counter.md

File metadata and controls

8 lines (7 loc) · 297 Bytes

There are people sitting in a circular fashion, print every third member while removing them, the next counter starts immediately after the member is removed. Print till all the members are exhausted.

For example: Input: consider 123456789 members sitting in a circular fashion, Output: 369485271