3 ms·
It looks like their algorithm can only modify the input list by swapping elements. This is guaranteed to result in a permutation.
by ogogmad 6y ago
It looks like their algorithm can only modify the input list by swapping elements. This is guaranteed to result in a permutation.