Go to file
Thomas Forgione cbff0068ad
Removed public functions, public functions take usize
2018-07-09 16:54:31 +02:00
src Removed public functions, public functions take usize 2018-07-09 16:54:31 +02:00
.gitignore Initial commit 2018-07-09 16:35:57 +02:00
Cargo.toml Initial commit 2018-07-09 16:35:57 +02:00
README.md Moved README out of the sources... 2018-07-09 16:39:35 +02:00

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);