News for hackers. Stuff that matters.
Re:Timsort is a sorting algorithm that is efficient for real... by dmichulke on Wednesday July 04, 2018 @05:05AM (#17456097)
We just generate them on the fly - after all we're not stupid ;-)

https://en.wikipedia.org/wiki/Permutation#Algorithms_to_gene...

.. and there

"Generation in lexicographic order"

This algorithm only requires you to hold the last permutation in memory to obtain a new (distinct) one.

There are no comments on this comment yet.