out::iter
pub fn max_unstable<T: Ord>( iter: impl IntoIterator<Item = T>, n: usize) -> Vec<T>
Returns the n largest items from an iterator.
n
This sort is unstable (i.e. may reorder equal elements) and typically faster than max.
max
Panics if n > len.
n > len
let max = out::iter::max_unstable(-10..10, 3); assert_eq!(max, [7, 8, 9]);