Question 72Asked in DSSSB PGT Computer Science (Technical), 11 Jul 2021

What is the average number of comparisons required in sequential search to find an element?

  1. An²
  2. Bn(n + 1)/2
  3. Cn
  4. D(n + 1)/2
Show answerHide answer

Correct answer: (D) (n + 1)/2

Explanation

If the item is equally likely to be at any position, the average number of comparisons is (1 + 2 + ... + n)/n = (n + 1)/2.

From DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021

This is question 72 of DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.