binarySearchExactOrRightBelow

fun <T, D> binarySearchExactOrRightBelow(target: T, list: ArrayList<D>, comparator: BinarySearchComparator<T, D>): Int

Perform a binary search for an item that matches exactly or has value right below the target.

Parameters

target

The target value for the search.

list

The list of items to search within. The list must be sorted in ascending order.

comparator

The comparator function for performing the search.