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