by vram22 · 9y ago · 0 comments
bug in java binary search
and showed a related search in the drop-down, 'programming pearls ...', a book by Jon Bentley, which seems to confirm what I said above (though I saw it in his other book, "Efficient Programs", IIRC - he might have mentioned the same issue in the Programming Pearls book too).
Edit: and the Wikipedia article confirms it too:
https://en.wikipedia.org/wiki/Binary_search_algorithm#Implem...