Quickselect algorithm: Difference between revisions
m
Minor edit to Rust code
m (Rust - replace Ord by PartialOrd) |
m (Minor edit to Rust code) |
||
Line 2,357:
}
a.swap(right, store_index);
}
Line 2,385:
// to the left of it and larger elements are to its right.
fn nth_element<T: PartialOrd>(a: &mut [T], n: usize) {
}
|