Last letter-first letter: Difference between revisions

Fixed bug in second D version
(Improved second D version)
(Fixed bug in second D version)
Line 132:
 
foreach (ushort i, item; items)
refs ~= Ref(i, item[0$-1], item[$-10]);
 
// try each item as possible start
Line 169:
writeln("Paths of that length: ", sol_nsol[1]);
writeln("Example path of that length:");
foreachfor (int i; iota(= 0,; i < sol_nsol[0].length,; i += 7))
writeln(" ", sol_nsol[0][i .. min(i+7, $)].join(" "));
}</lang>
Runtime: about 0.6779 seconds, dmd compiler.
 
=={{header|Go}}==
Anonymous user