pub fn sort<T: Ord>(data: &mut [T])
Expand description
Sorts a data set using Shell Sort
Average time complexity: O(n2)
ยงExamples
use sorting_algorithm::shell_sort;
fn main() {
let mut data = [3, 1, 2, 5, 4];
shell_sort::sort(&mut data);
assert_eq!(data, [1, 2, 3, 4, 5]);
}