Difference between upper_bound and lower_bound in stl

value a a a b b b c c c
index 0 1 2 3 4 5 6 7 8
bound       l     u

Where l represents the lower bound of b, and u represents the upper bound of b.

So if there are range of values that are “equal” with respect to the comparison being used, lower_bound gives you the first of this, upper_bound gives you one-past-the-end of these. This is the normal pattern of STL ranges [first, last).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)