MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / tournament_sort

Function tournament_sort

src/sorting/tournament_sort.rs:8–55  ·  view source on GitHub ↗

From Wikipedia: Tournament sort is a sorting algorithm. It improves upon the naive selection sort by using a priority queue to find the next element in the sort. Time complexity is `O(n log n)`, where `n` is the number of elements. Space complexity is `O(n)`.

(arr: &[T])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 6

descendingFunction · 0.85
emptyFunction · 0.85
negative_numbersFunction · 0.85
one_elementFunction · 0.85
pre_sortedFunction · 0.85
repeated_elementsFunction · 0.85

Calls 2

min_optFunction · 0.85
lenMethod · 0.45

Tested by 6

descendingFunction · 0.68
emptyFunction · 0.68
negative_numbersFunction · 0.68
one_elementFunction · 0.68
pre_sortedFunction · 0.68
repeated_elementsFunction · 0.68