3 ms·
Knuth’s section on binary search in The Art of Computer Programming is enlightening. One historical curiosity that he notes is that it took something like a dec
by User23 4y ago
Knuth’s section on binary search in The Art of Computer Programming is enlightening. One historical curiosity that he notes is that it took something like a decade from the discovery of the algorithm to an implementation that was correct for all inputs.
I briefly tried using binary search as a weeder problem and quickly abandoned it when no one got it right.