3 ms·
It is obvious that binary search leverages the property that the input is sorted in order to ignore part of the input, but it is less obvious to see it abstract
by HelloNurse 2y ago
It is obvious that binary search leverages the property that the input is sorted in order to ignore part of the input, but it is less obvious to see it abstractly as an exotic specimen of sublinear exact algorithm rather than merely as a simple special case of search, and it is even less obvious to investigate what weaker (and hopefully cheaper to guarantee) input constraints allow sublinear search algorithms.