Hi, how are you?
I'm studying upper_bound
I've only known how to use it like the first one below What exactly does the bottom mean?
V is a vector, but the beginning part is not defined, so can you explain it?
upper_bound(v.begin(),v.end(),value);
upper _bound(V,V+x,value);
c++
v.begin()
means the beginning of the vector
v.end()
means the end of the vector.
upper_bound (a, b, c) is the command to find the upperbound of the value c in the range a to b.
For example, upper_bound(v.begin(),v.end(),value);
is to search from beginning to end of vector to find the upper bound of the value value.
© 2024 OneMinuteCode. All rights reserved.