MCPcopy Create free account
hub / github.com/douchuan/algorithm / sort

Method sort

src/strings/msd.rs:90–96  ·  view source on GitHub ↗

Rearranges the array of extended ASCII strings in ascending order.

(a: &mut [T])

Source from the content-addressed store, hash-verified

88{
89 /// Rearranges the array of extended ASCII strings in ascending order.
90 pub fn sort(a: &mut [T]) {
91 let n = a.len();
92 if n > 0 {
93 let mut aux = vec![a[0]; n];
94 Self::do_sort(a, 0, n - 1, 0, &mut aux);
95 }
96 }
97
98 /// sort from a[lo] to a[hi], starting at the d-th character
99 fn do_sort(a: &mut [T], lo: usize, hi: usize, d: usize, aux: &mut [T]) {

Callers

nothing calls this directly

Calls 2

do_sortFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected