#fallback
Wiki
›
Algorithms
›
01. Searching and Sorting
›
12. Specialized Search and Sorted-Order Procedures
›
Interpolation Search with Fallback
Interpolation Search with Fallback Interpolation search with fallback combines the speed of interpolation search on well distributed numeric keys with the reliability of binary search. It estimates where the target should be by value, but falls back to ordinary binary search when the estimate becomes poor, unstable, or unsafe. This gives good performance on near uniform data while preserving the worst case behavior of binary search. Problem Given a sorted...