Sorting algorithms/Permutation sort: Difference between revisions

Updated D entry
(Updated first D entry)
(Updated D entry)
Line 395:
<lang d>import std.stdio, std.algorithm, permutations2;
 
void permutationSort(T)(T[] items) pure /*nothrow*/ @safe {
foreach (const perm; items.permutations!false)
if (perm.isSorted) {