Joined March 2012
·

João Paulo Bochi

Brazil
·
·

Posted to Order by Random in C# over 1 year ago

Anyways, I prefer my implementation because it catches argument errors earlier.

Here it is: https://bitbucket.org/jpbochi/jplabscode/src/025d97301e69600f046c65281a009733be5deed9/Extensions/EnumerableExt.cs?at=default#cl-309

Posted to Order by Random in C# over 1 year ago

This is much better: http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm

There's a discussion about it on SO: stackoverflow.com/questions/1287567/is-using-random-and-orderby-a-good-shuffle-algorithm/1287572

Achievements
38 Karma
0 Total ProTip Views
Interests & Skills