Is it true or false that a binary search algorithm is always faster than sequential search algorithm?
Answers
Answered by
1
The worst case of a sequential searchis larger than the worst case of abinary search for arrays that aren't tiny. But tiny is very small. Even with three elements, the worst case of a binary search is smaller than the worst case of a sequential search. At that size, ti is too small to matter though.
Similar questions