Data Structures & AlgorithmsHardTCS NQT · Linked List

Seven people numbered 1 to 7 stand in a circle (a circular linked list). Counting starts at person 1, and every 3rd person is removed, counting continues from the next person, until one remains. Who survives?

  1. A. 1
  2. B. 5
  3. C. 6
  4. D. 4

Correct answer: D. 4

Removal order is 3, 6, 2, 7, 5, 1, leaving person 4.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic