federico-busato / Modern-CPP-Programming

Modern C++ Programming Course (C++03/11/14/17/20/23/26)
https://federico-busato.github.io/Modern-CPP-Programming/
11.91k stars 798 forks source link

lower_bound/upper_bound for ordered/unordered containers mismatch #72

Closed eugenefil closed 7 months ago

eugenefil commented 7 months ago

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-busato commented 7 months ago

thanks, @eugenefil! you are right, O(log(n)) is in the wrong row