Lower Bound
SearchingEasyFind the first index where element >= target in a sorted collection.
Alt+Shift+L
Configuration Panel
First Element Greater/Equal Target Index Highlight
50
81
122
123
124
385
566
727
Time Complexity
O(log N) search operations
Space Complexity
O(1) auxiliary variables
Conceptual Overview
Lower Bound returns the index of the first element in a sorted range that does not compare less than the target value (i.e. element >= target).
Algorithm Idea
Run binary search using bounds low = 0, high = N. If mid value >= target, shift high = mid, otherwise shift low = mid + 1.
Stable Sorting
N/A
In-place Memory
N/A
Source: CP-Algorithms search & sorting reference