Skip to content
Related Articles

Related Articles

Improve Article

ISRO | ISRO CS 2016 | Question 25

  • Last Updated : 10 Jun, 2019

The average number of key comparisons required for a successful search for sequential search on items is
(A) n/2
(B) (n-1)/2
(C) (n+1)/2
(D) None of these


Answer: (C)

Explanation: If element is at i-th position where 1 <= i <= n, then we need i comparisons. So average number of comparisons is (1 + 2 + 3 + ..... n)/n = (n * (n + 1)/ 2) / n = (n + 1)/2

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :