federico-busato / Modern-CPP-Programming

Modern C++ Programming Course (C++03/11/14/17/20/23/26)

Home Page:https://federico-busato.github.io/Modern-CPP-Programming/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lower_bound/upper_bound for ordered/unordered containers mismatch

eugenefil opened this issue · comments

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.

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