logo
pub fn bucket_sort<H, F, T>(arr: &mut [T], hasher: F) where
    H: Ord,
    F: Fn(&T) -> H,
    T: Ord + Clone
Expand description

Bucket sort

  • arr - Collection of value to be sorted in place.
  • hasher - Function hashing to map elements to correspoding buckets.

Ref: https://codereview.stackexchange.com/a/145124