Search within an interval in the sorted sequence for a specific element.
Search within an interval in the sorted sequence for a specific element. If the
sequence is an IndexedSeqLike
, a binary search is used. Otherwise, a linear search
is used.
The sequence should be sorted with the same Ordering
before calling; otherwise,
the results are undefined.
the element to find.
the index where the search starts.
the index following where the search ends.
the ordering to be used to compare elements.
a Found
value containing the index corresponding to the element in the
sequence, or the InsertionPoint
where the element would be inserted if
the element is not in the sequence.
scala.collection.SeqLike, method sorted
Search the sorted sequence for a specific element.
Search the sorted sequence for a specific element. If the sequence is an
IndexedSeqLike
, a binary search is used. Otherwise, a linear search is used.
The sequence should be sorted with the same Ordering
before calling; otherwise,
the results are undefined.
the element to find.
the ordering to be used to compare elements.
a Found
value containing the index corresponding to the element in the
sequence, or the InsertionPoint
where the element would be inserted if
the element is not in the sequence.
scala.collection.SeqLike, method sorted