KnowledgeBoat Logo

Computer Applications

How does the binary search find the presence of an element quicker than the linear search?

Java Arrays

8 Likes

Answer

As Binary Search repeatedly divides the array into two halves and performs the search in only one of those two halves, it needs to make fewer comparisons relative to Linear Search hence it is faster than Linear Search.

Answered By

6 Likes


Related Questions