3 ms·
9 to 2 definitely isn't binary search.
by archon810 6y ago
9 to 2 definitely isn't binary search.
- Thorrez 6y agoIt could be if you're binary searching the range of 2 to 9 maybe, or -5 to 9. But if not, you're right it's not exactly binary search, it's interpolation search, which is like binary search it just uses a different midpoint finding algorithm. https://en.wikipedia.org/wiki/Interpolation_search https://en.wikipedia.org/wiki/Interpolation_search