insort_right<E> function

void insort_right<E>(
  1. List<E> a,
  2. E x, {
  3. Comparator<E>? compare,
  4. ToKey<E, Object>? key,
  5. int lo = 0,
  6. int? hi,
})

Similar to insort_left, but inserting item in list after any existing entries of item.

Implementation

void insort_right<E>(List<E> a, E x,
    {Comparator<E>? compare, ToKey<E, Object>? key, int lo = 0, int? hi}) {
  a.insert(bisect_right(a, x, compare: compare, lo: lo, hi: hi, key: key), x);
}