#iterator #maximum #minimum #values #heap #time #space

max_n

A utility function on iterators to find the maximum or minimum n values

1 unstable release

0.1.0 Dec 1, 2022

#20 in #maximum

MIT license

7KB
158 lines

Max_N

This crate can compute the maximum or minimum k values of an iterator of size n in O(n * log k) time and O(k) space. It uses a fixed-size heap to do this.

No runtime deps