Skip to main content

radix_sort_by_key

Function radix_sort_by_key 

Source
pub fn radix_sort_by_key<T: Clone>(
    data: &mut Vec<T>,
    key_fn: impl Fn(&T) -> u32,
)
Expand description

Sort a VecTin ascending order of theu32key produced bykey_fn`.

Uses LSD radix sort (4 passes of 8 bits). The sort is stable.