Interpolation search works better than Binary Search for a sorted and uniformly distributed array.
On average the interpolation search makes about log(log(n)) comparisons (if the elements are uniformly distributed), where n is the number of elements to be searched. In the worst case (for instance where the numerical values of the keys increase exponentially) it can make up to O(n) comparisons.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Interpolation Search
- Why is Binary Search preferred over Ternary Search?
- Meta Binary Search | One-Sided Binary Search
- Linear Search vs Binary Search
- Repeatedly search an element by doubling it after every successful search
- Binary Search in PHP
- Binary Search
- Variants of Binary Search
- Binary Search a String
- Binary Search using pthread
- Binary Search in Java
- Uniform Binary Search
- The Ubiquitous Binary Search | Set 1
- A Problem in Many Binary Search Implementations
- Floor in Binary Search Tree (BST)
- Binary Search (bisect) in Python
- Randomized Binary Search Algorithm
- Complexity Analysis of Binary Search
- Minimum swaps so that binary search can be applied