A binary search is effective only when the list searched is ordered. It is efficient only when the list is dense—i.e. when records are in contiguous locations. It is easy to show that the maximum number of looks for a search L is given by [1]. L = [log2N+1], (1) where N is the number of records in the list and the square bracket means “integral part of.”
The Latest from CACM
Shape the Future of Computing
ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.
Get InvolvedCommunications of the ACM (CACM) is now a fully Open Access publication.
By opening CACM to the world, we hope to increase engagement among the broader computer science community and encourage non-members to discover the rich resources ACM has to offer.
Learn More
Join the Discussion (0)
Become a Member or Sign In to Post a Comment