4 ms·
Binary search doesn't always turn out well.
by Thorrez 6y ago
Binary search doesn't always turn out well.
- archon810 6y ago9 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