Consider the following statements about searching algorithms and choose the correct option.
ASequential search requires the list to be ordered, while there is no such constraint for Binary search.
BBinary search has time complexity of O(log₂ n), while sequential search has time complexity of O(n). Here, n is the number of elements in the list.
CLink list is a suitable data structure for storing a list, and performing Binary search.
DThe best case in Binary search is, when the key element exists in the begining of the list.
Show answerHide answer
Correct answer: (B) Binary search has time complexity of O(log₂ n), while sequential search has time complexity of O(n). Here, n is the number of elements in the list.
Explanation
Corrected: the book's key says (c), but (b) is the true statement. Binary search needs random access, so a linked list is unsuitable for it.