lower_bound/upper_bound for ordered/unordered containers mismatch
eugenefil opened this issue · comments
Evgeniy Filimonov commented
Hi! On p.30 in file 17.Iterators_Containers_Alg.pdf
under the title "Supported Operations and Complexity" there is a table for ordered and unordered containers. In the last column lower_bound/upper_bound
there is O(log(n))
for unordered containers. Shouldn't this be in the row for ordered containers instead? It's std::map
and std::set
which have lower_bound()
and upper_bound()
, but not std::unordered_map
and std::unordered_set
.
Federico commented
thanks, @eugenefil! you are right, O(log(n))
is in the wrong row