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.
Re:Timsort is a sorting algorithm that is efficient for real...
by senatorobama on Tuesday July 03, 2018 @03:33AM
(#17448228)
Good interview question ;)
Sorting a mere 13 items of 1-byte each would require 6.2 GB of storage.