Best shuffle: Difference between revisions
Content added Content deleted
(Per request, replaced PowerShell with sample that meets task requirements) |
m (reduce overaccentuation of task description) |
||
Line 3:
;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.
A shuffle that produces a randomized result among the best choices is to be preferred. A deterministic approach that produces the same sequence every time is acceptable as an alternative.▼
Display the result as follows:
original string,
The
;Example:
tree,
▲A deterministic approach that produces the same sequence every time is acceptable as an alternative.
|