Talk:Knuth shuffle: Difference between revisions
Content added Content deleted
m (→F#) |
No edit summary |
||
Line 23: | Line 23: | ||
:: Good question. I know zilch about F# as well. -- [[User:Rldrenth|Rldrenth]] 04:02, 16 January 2010 (UTC) |
:: Good question. I know zilch about F# as well. -- [[User:Rldrenth|Rldrenth]] 04:02, 16 January 2010 (UTC) |
||
== C# == |
|||
The C# code had a serious problem in its implementation. It selected a random position from the *entire* array on each loop. This is a serious problem as it leads to a non-uniform distribution of outcomes, thereby ruining the purpose of the algorithm. Wikipedia has a nice description of the problem [http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Implementation_errors here]. |