Y
Hacker News
new
|
ask
|
show
|
jobs
by
cleancoder0
1567 days ago
I believe half-open intervals is something C++ uses for std::lower_bound and std::upper_bound.
2 comments
mark-r
1567 days ago
Using half-open intervals for std::lower_bound and std::upper_bound has an unexpected benefit. It allows the functions to return an insertion point that keeps the sequence sorted, even if that insertion point is at the end of the sequence.
link
thaumasiotes
1567 days ago
Half-open intervals are very common because they overlap perfectly.
link