#iterable #maximum #minimum #values #finding

minmaxn

finding the minimum or maximum n values from an iterable

4 releases

0.2.0 Dec 1, 2022
0.1.2 Dec 1, 2022
0.1.1 Dec 1, 2022
0.1.0 Dec 1, 2022

#13 in #iterable

MIT license

9KB
245 lines

MinMaxN

Find the minimum and maximum k values in an iterable in O(n * k) time when k < log2 n, otherwise O(n log n + k)

No runtime deps