MCPcopy Index your code
hub / github.com/TheAlgorithms/Rust / bucket_sort

Function bucket_sort

src/sorting/bucket_sort.rs:7–32  ·  view source on GitHub ↗

Sort a slice using bucket sort algorithm. Time complexity is `O(n + k)` on average, where `n` is the number of elements, `k` is the number of buckets used in process. Space complexity is `O(n + k)`, as it sorts not in-place.

(arr: &[usize])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 6

emptyFunction · 0.85
one_elementFunction · 0.85
already_sortedFunction · 0.85
basicFunction · 0.85
odd_number_of_elementsFunction · 0.85
repeated_elementsFunction · 0.85

Calls 7

maxMethod · 0.80
pushMethod · 0.80
insertion_sortFunction · 0.70
is_emptyMethod · 0.45
iterMethod · 0.45
lenMethod · 0.45
iter_mutMethod · 0.45

Tested by 6

emptyFunction · 0.68
one_elementFunction · 0.68
already_sortedFunction · 0.68
basicFunction · 0.68
odd_number_of_elementsFunction · 0.68
repeated_elementsFunction · 0.68