Anonymous user
Sorting algorithms/Permutation sort: Difference between revisions
Sorting algorithms/Permutation sort (view source)
Revision as of 13:30, 25 April 2012
, 12 years agoFaster D entry
(Improved D entry) |
(Faster D entry) |
||
Line 346:
void permutationSort(T)(T[] items) /*pure nothrow*/ {
foreach (perm; permutations!false(items))
if (isSorted(perm)) {
items[] = perm;
|