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

max_n

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

1 unstable release

0.1.0 Dec 1, 2022

#22 in #maximum

27 downloads per month

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