Question 7
Back to Exercise
On a sorted range, what does std::lower_bound(b, e, x) return?
- A The last element ≤ x
- B An iterator to the first element ≥ x (or e if none) Correct
- C The index of x
- D true or false
Correct Answer: Option B
upper_bound returns the first element > x.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!