MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
‘The algorithm is longer and more complex to write’ is a disadvantage for a
A
Binary Search
B
Linear Search
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -The biggest problem with a binary search is that you can only use this if the data is sorted into an order.

Detailed explanation-2: -However, the main disadvantage of the Binary Search algorithm is that it requires a sorted array to discard half of the search space at each iteration.

Detailed explanation-3: -binary search algorithm is not efficient when the data elements are more than 1000.

There is 1 question to complete.