Submission timeline
2007–2026One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.
First comments on top threads
HN comment orderIt is not sufficient merely to prove a program correct; you have to test it too. Moreover, to be really certain that a program is correct, you have to test it for all possible input values, but this is seldom feasible. This statement is tantamount to saying "you don't merely need to prove Fermat's Last Theorem, you also have to test it for all possible input values". By this line of reasoning, most of mathematics should be thrown out. If…
It's not binary searches and merge sorts that are broken, it's the INT data type that is "broken" (and I put "broken" in scare quotes because they aren't really broken, they just don't do what you want in most cases). People tacitly assume that INTs model the integers, but they don't. They model the integers modulo 2^N for some value of N. If you code as if INTs were integers and you hit the 2^N limit you will lose. The…
Not just binary search. Anything that involves addition of signed integers could overflow.
I remember when this came out. I looked at the code for Binary Search & Merge Sort that I had written for a Data Structures and Algorithms class I was teaching at the time. Neither of these had the bug. The reason was that I was using C++ iterators. template<typename RAIter> void mergeSort(RAIter first, RAiter last); So I could not do RAIter middle = (first + last) / 2; because the there is no operator+ on iterators in general. Instead…
The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.
- Breakout years
- 2
- Total points
- 285
- Total comments
- 131
100+ points or 50+ comments
reference only — not used in Hall rules or ranking
reference only — not used in Hall rules or ranking
Every submission
| Date | Title as submitted | By | Points | Comments |
|---|---|---|---|---|
| 2009-05-22 | Google Research Blog: Nearly All Binary Searches and Mergesorts are Broken [2006] | floatingatoll | 21 | 9 |
| 2010-02-17 | Nearly All Binary Searches and Mergesorts are Broken (2006)First breakout | gruseom | 101 | 49 |
| 2012-01-30 | Nearly all binary search and merge sort implementations are broken (2006)Best thread · Latest 20+ point return | arto | 148 | 69 |
| 2014-04-15 | Nearly All Binary Searches and Mergesorts are Broken (2006) | DanielRibeiro | 10 | 2 |
| 2015-02-26 | Read All About It: Nearly All Binary Searches and Mergesorts Are Broken | xvirk | 4 | 2 |
| 2015-10-22 | Nearly All Binary Searches and Mergesorts Are Broken (2006) | oskarth | 1 | 0 |
