Data Structures & AlgorithmsHardTCS NQT · Accenture

In the list [1, 3, 4, 7, 2, 9], how many nodes come strictly before the first node whose value exceeds 5?

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

Correct answer: C. 3

The first node above 5 is 7, which is preceded by 1, 3 and 4.

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

Exams that ask this topic