4 ms·
it took about ten years from the time of the first purported publication of a binary search algorithm for a correct algorithm to be published it's an algorithm
by kragen 4y ago
it took about ten years from the time of the first purported publication of a binary search algorithm for a correct algorithm to be published
it's an algorithm where it's easy to have off-by-one errors that lead to nontermination or incorrect results for certain inputs
integer overflow is also a problem on some platforms, especially java
- ilyt 4y agoI doubt someone spent 10 years trying to implement a binary search. I suspect it is as usual, someone made theoretical invention, then someone else looked at it years later and wrote implementation in evening or two
- kragen 4y agomore likely there were a lot of correct implementations, but they got debugged after the initial publication, and then didn't publish the erratum