[−][src]Function buldak::selection::sort
pub fn sort<T>(arr: &mut [T]) where
T: Ord,
Sort in ascending order using a selection sort algorithm.
let mut nums = [1, 4, 2, 3, 5, 111, 234, 21, 13]; selection::sort(&mut nums); assert_eq!(nums, [1, 2, 3, 4, 5, 13, 21, 111, 234]);