Go to file
Thomas Forgione 6cea19bcc3
Moved README out of the sources...
2018-07-09 16:39:35 +02:00
src Moved README out of the sources... 2018-07-09 16:39:35 +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);