Best shuffle: Difference between revisions

Content added Content deleted
m (formatting improvements)
Line 1: Line 1:
{{task}}Shuffle the characters of a string in such a way that as many of the characters are in a different position as possible. Print the result as follows: original string, shuffled string, (num characters ignored)
{{task}}Shuffle the characters of a string in such a way that as many of the characters are in a different position as possible. Print the result as follows: original string, shuffled string, (num characters ignored)


For example: tree, eetr, (0)
For example: <code>tree, eetr, (0)</code>

The words to test with are: abracadabra, seesaw, elk, grrrrrr, up, a


The words to test with are: <code>abracadabra</code>, <code>seesaw</code>, <code>elk</code>, <code>grrrrrr</code>, <code>up</code>, <code>a</code>


=={{header|D}}==
=={{header|D}}==