pub fn upper_bound<T: PartialOrd>(slice: &[T], value: &T) -> Option<usize>
Expand description
Get the position of the upper bound of value in the slice.
ยงExamples
let slice = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
assert_eq!(Some(6), rsalgo::base::upper_bound(&slice, &5));