Data Structures & AlgorithmsHardTCS NQT · Infosys

A list holds 1 to 10. Every node whose 1-based position is a multiple of 3 is deleted. What is the sum of the remaining values?

  1. A. 38
  2. B. 39
  3. C. 37
  4. D. 41

Correct answer: C. 37

The deleted values are 3, 6 and 9 (sum 18). The total of 1 to 10 is 55, leaving 37.

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

Exams that ask this topic