bsearchLessThan method
Assuming the list is sorted, locate rightmost element less than x
.
If the element is found, the index of element is returned. If not found, -1 is returned.
Implementation
int bsearchLessThan(E x, {Comparator<E>? compare}) {
final i = this.bisectLeft(x, compare: compare);
if (i != 0) {
return i - 1;
}
return -1;
}