GATE CS 2015, set 2 · Question 16 · Algorithms · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

An unordered list contains n distinct elements. The number of comparisons to find an element in this list that is neither maximum nor minimum is

  1. (A) Θ(n log n)
  2. (B) Θ(n)
  3. (C) Θ(log n)
  4. (D) Θ(1)
Answer

Answer (D)

Answer from the official GATE CS 2015 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes