How internally upper_bound works in c++for sorted vector(in ascending order) works in c++. Let say 'A' is a sorted vector.Then how upper_bound(A.begin(),A.end(),x) will directly give iterator to first element greater than x.↵
Thanks in advance.
Thanks in advance.