Computer Science, asked by greenflame308, 1 year ago

How does binary search give benefit over sequential search?

Answers

Answered by swatisharma28589
0
A binary search comes with the prerequisite that the data must be sorted. ... Just remember that sorting data, even with the most efficient algorithm, will always be slower than a linear search (the fastest sorting algorithms are O(n * log n)). So you should never sort data just to perform a single binary search later on.
Answered by sakagksp
0

A binary search comes with the prerequisite that the data must be sorted. ... Just remember that sorting data, even with the most efficient algorithm, will always be slower than a linear search (the fastest sorting algorithms are O(n * log n)). So you should never sort data just to perform a single binary search later

Similar questions