Scoop API

scoop:scoop.std:0.1.0

binarySearch

function binarySearch

source · line 30
public
public fun <T : Compare<T>> List<T>.binarySearch(element: T, fromIndex: Long = 0L, toIndex: Long = this.size): Long

Extension receiver: List<T>

Searches a range sorted by the same ordering. The range is fromIndex inclusive to toIndex exclusive; absence returns -(insertionIndex + 1).

function binarySearch

source · line 10
public
public fun <T> List<T>.binarySearch(element: T, comparator: Comparator<T>, fromIndex: Long = 0L, toIndex: Long = this.size): Long

Extension receiver: List<T>

Searches a range sorted by the same ordering. The range is fromIndex inclusive to toIndex exclusive; absence returns -(insertionIndex + 1).