Function search_sort::sort::quick [−][src]
pub fn quick<T: Ord>(slice: &mut [T])
Expand description
An implementation of quick sort.
Partitions the slice into two parts by quick_partition
, and invokes
itself until the list is sorted.
Examples
use search_sort::sort; let mut slice = [5, 1, -5, 3, 9, 2, 19]; sort::quick(&mut slice); assert_eq!(slice, [-5, 1, 2, 3, 5, 9, 19]);