MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
If the length of the list is 100 times longer, the search will might on average only take 7-8 times longer to complete.This is true using a:
A
linear search
B
binary search
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -So with an array of length 8, binary search needs at most four guesses.

Detailed explanation-2: -Using this equation, it is possible to predict that a binary search of a 1, 000 item list will require, at most 10 comparisons.

Detailed explanation-3: -Binary search on an array with 10000 elements can take upto 14 steps, just as you would expect.

There is 1 question to complete.