Article
Version 1
Preserved in Portico This version is not peer-reviewed
Interpolation Once Binary Search over a Sorted List
Version 1
: Received: 12 April 2024 / Approved: 15 April 2024 / Online: 15 April 2024 (08:44:02 CEST)
How to cite: Lin, J. Interpolation Once Binary Search over a Sorted List. Preprints 2024, 2024040896. https://doi.org/10.20944/preprints202404.0896.v1 Lin, J. Interpolation Once Binary Search over a Sorted List. Preprints 2024, 2024040896. https://doi.org/10.20944/preprints202404.0896.v1
Abstract
Searching over a sorted list is a classical problem in computer science. Binary Search takes at most log2n+1 tries to find an item in a sorted list of size n. Interpolation Search achieves an average time complexity of Ο(loglogn) for uniformly distributed data. Hybrids of Binary Search and Interpolation Search are also available to handle data with unknown distributions. This paper analyzes the computation cost of these methods and shows that interpolation can significantly affect their performance — accordingly, a new method, Interpolation Once Binary Search (IOBS), is proposed. The experimental results show that IOBS outperforms the hybrids of Binary Search and Interpolation Search for nonuniformly distributed data.
Keywords
binary search; interpolation search; interpolated binary search
Subject
Computer Science and Mathematics, Computer Science
Copyright: This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Comments (0)
We encourage comments and feedback from a broad range of readers. See criteria for comments and our Diversity statement.
Leave a public commentSend a private comment to the author(s)
* All users must log in before leaving a comment