What does lower_bound mean. If I had to guess I would answer that this function returns the iterator at the last element that is less than the value asked for. But I see tha
Another usage of lower_bound and upper_bound is to find a range of equal elements in a container, e.g.
std::vector data = { 1, 1, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6 };
auto lower = std::lower_bound(data.begin(), data.end(), 4);
auto upper = std::upper_bound(lower, data.end(), 4);
std::copy(lower, upper, std::ostream_iterator(std::cout, " "));