pub fn bisect_right<T>(a: &[T], x: &T) -> usizewhere
T: Ord,
Expand description
Return the index where x
should be inserted in a
, assuming a
is sorted.
The return value i
is such that all e
in a[..i]
have e <= x
, and
all e
in a[i..]
have e > x
.
- If
a
containsx
,a.insert(i, x)
will insert just after the rightmost occurence ofx
.