Skip to content

Latest commit

 

History

History

BestShuffle

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Task 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)

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

Example tree, eetr, (0)

Test cases abracadabra raarbbadaac

seesaw elk grrrrrr up a

[Source https://rosettacode.org/wiki/Best_shuffle]