Returns the first index of list, sorted ascending by comparator (natural order when omitted),
whose element compares equal to key, or -1 when none does. The result on an unsorted list is
unspecified.
Time: at most ⌈log₂(n + 1)⌉ + 1 comparator calls and as many get calls.
Returns the first index of
list, sorted ascending bycomparator(natural order when omitted), whose element compares equal tokey, or-1when none does. The result on an unsorted list is unspecified.Time: at most ⌈log₂(n + 1)⌉ + 1 comparator calls and as many
getcalls.