Crates.io | selection_sort |
lib.rs | selection_sort |
version | 1.1.0 |
source | src |
created_at | 2019-12-31 02:24:02.672531 |
updated_at | 2019-12-31 18:53:23.847173 |
description | Selection sort algorithm |
homepage | |
repository | https://github.com/dmjio/selection_sort |
max_upload_size | |
id | 193714 |
size | 4,279 |
Selection Sort implemented in Rust
use selection_sort::selection_sort;
fn main () {
let mut vec = vec![1, 3, 2];
selection_sort(&mut vec);
println!("{:?}", vec);
assert!(vec == [1, 2, 3]);
}
// [1,2,3]