4 ms·
Regarding "very simple" - as I recall from some book, first bug-free implementation appeared only after several years after invention / initial description of t
by kmike84 8y ago
Regarding "very simple" - as I recall from some book, first bug-free implementation appeared only after several years after invention / initial description of the algorithm. From wikipedia: "A study published in 1988 shows that accurate code for it is only found in five out of twenty textbooks" (https://en.wikipedia.org/wiki/Binary_search_algorithm https://en.wikipedia.org/wiki/Binary_search_algorithm).