Best shuffle: Difference between revisions

Content added Content deleted
m (changed the example in the preamble to match the task's requirements.)
m (used better highlighting for a task requirement.)
Line 4: Line 4:
Shuffle the characters of a string in such a way that as many of the character values are in a different position as possible.
Shuffle the characters of a string in such a way that as many of the character values are in a different position as possible.


Display the result as follows:   original string,   shuffled string,   (score).
Display the result as follows:

original string, shuffled string, (score)


The   ''score''   gives the number of positions whose character value did   ''not''   change.
The   ''score''   gives the number of positions whose character value did   ''not''   change.