2 ms·
One of the uncommon times a sensational headline is actually correct! I love this bug - it's been my go-to example of how there are bugs in every piece of code
by edanm 13y ago
One of the uncommon times a sensational headline is actually correct!
I love this bug - it's been my go-to example of how there are bugs in every piece of code, no matter how supposedly common. A bug in Java's implementatino of Binary Search - one of the most popular languages, and one of the most used algorithms - and still a bug managed to lay in wait for 9 years.
- SideburnsOfDoom 13y agoI see that as a limitation. "works only with data sizes up to half of MAXINT" is not a very surprising limitation of int mid = (low + high) / 2;
- kokey 13y agoI was also thinking this was a stereotypical HN sensational headline blog post. Apart from being strangely correct, it somehow makes me want to code something in Java today.