3 ms·
The reason there are so many buggy binary search implementations however is also the reliance of TDD and similar. Very few tests attempt a binary search over a
by the_mitsuhiko 5y ago
The reason there are so many buggy binary search implementations however is also the reliance of TDD and similar. Very few tests attempt a binary search over a container where overflows become an issue. Yet sooner or later someone will actually try to use it for that purpose and discover that it fails.