Talk:Best shuffle: Difference between revisions

From Rosetta Code
Content added Content deleted
(rm discussion of new J solution - thanks to RDM for improving it so much. Maintain suggestion re: task description.)
Line 6: Line 6:


--[[User:DanBron|DanBron]] 18:28, 15 December 2010 (UTC)
--[[User:DanBron|DanBron]] 18:28, 15 December 2010 (UTC)

: Well, it's says "characters" not "indexes". But feel free to change the wording as you see fit. [[User:Fwend|Fwend]] 20:16, 15 December 2010 (UTC)

Revision as of 20:16, 15 December 2010

This was a fun algorithm to write --- lots of twists and turns. Gerard Schildberger

Task Description

I think it would improve the task description if we said something along the lines of "Shuffle the characters of a string to produce a string as different as possible from the original. That is, the maximum # of characters in the output differ from the characters at the corresponding positions at the input". Only more concise :). I say that because the current wording lends itself to a trivial solution - reversing the string (because it doesn't make clear that a "character" is different only if its value, not its index, is different). In fact, that's how I initially interpreted the task (character=index), until I saw the solutions were a lot more complex than reverse().

--DanBron 18:28, 15 December 2010 (UTC)

Well, it's says "characters" not "indexes". But feel free to change the wording as you see fit. Fwend 20:16, 15 December 2010 (UTC)