Talk:Best shuffle: Difference between revisions

m
Line 50:
:: Could you explain your reasoning in more detail? (I am not getting your point.) For now, I will note that the above shows 10 and 4 in a cycle, which means the character at position 4 will be swapped with the character at position 10. (I assumed, by the way, that when you said "position 4" you meant index value 4 in the original string which corresponds to the first instance of the letter 'c' and which has position 9 in the list of equivalent indices. But since the remainder of 9 divided by 5 is 4, this letter also winds up being in the cycle with position 4 in the list of cycles.) --[[User:Rdm|Rdm]] 16:27, 23 May 2011 (UTC)
:: P.S. I am considering replacing these notes, so they follow the current entry. Please let me know how you want to deal with your comment in the re-write? Thanks. --[[User:Rdm|Rdm]] 16:41, 23 May 2011 (UTC)
:: P.P.S. If you are having problems with the J: I used the same underlying logic in the Javascript implementation. The C and Clojure versions also use this approach. --[[User:Rdm|Rdm]] 17:00, 23 May 2011 (UTC)
 
In degenerate cases, where more than half of the characters are the same, some of these cycles will only involve one character, which can not move to another position.
6,962

edits