0

Upper bound and lower bound

What is the difference between upper_bound() and lower_bound() in c++?

28th Oct 2018, 3:40 PM
Jacky Lui
Jacky Lui - avatar
1 Odpowiedź
+ 1
lower_bound - http://www.cplusplus.com/reference/algorithm/lower_bound/ "Returns an iterator pointing to the first element in the range [first,last) which does not compare less than val" upper_bound - http://www.cplusplus.com/reference/algorithm/upper_bound/ "Returns an iterator pointing to the first element in the range [first,last) which compares greater than val."
28th Oct 2018, 10:36 PM
Erik