Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

ISRO | ISRO CS 2014 | Question 28

  • Last Updated : 14 May, 2018

Suppose there are 11 items in sorted order in an array. How many searches are required on the average, if binary search is employed and all searches are successful in finding the item?
(A) 3.00
(B) 3.46
(C) 2.81
(D) 3.33


Answer: (A)

Explanation: For 11 items, Binary search required total number of comparisons for each item as following:

333

Therefore, total number of caparisons required
= 1*1 + 2*2 + 4*3 + 4*4 = 33

Average comparisons required for 11 items = 33/11 = 3

So, option (A) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!