bisection
pub fn insort_right<T>(a: &mut Vec<T>, x: T) where T: Ord,
Insert x in a, keeping it sorted assuming a is sorted. If a contains x, insert it just after the rightmost occurence of x.
x
a