Thomas Forgione cbff0068ad | ||
---|---|---|
src | ||
.gitignore | ||
Cargo.toml | ||
README.md |
README.md
partial-sort
A rust implementation of partial-sort algorithm based on mesuvash's gist.
Example
extern crate partial_sort;
use partial_sort::partial_sort;
let mut v = vec![5, 7, 4, 2, 8, 6, 1, 9, 0, 3];
partial_sort(&mut v[..], 3);
assert_eq!(v[0], 0);
assert_eq!(v[1], 1);
assert_eq!(v[2], 2);