This repo contains the Xamarin workbooks that accompany the Shuffle 101 course available on Office Mix. Xamarin Workbooks is a interactive environment for playing with code and exploring without spinning up a full IDE, instantiating projects etc. For more info check out the Xamarin Workbooks docs.
In Shuffle 101, I cover the background of the Fisher-Yates algorithm, describe its pros and cons and then illustrate the Knuth algorithm, a derivation of the original that solves two of the key limitations found in the original. You can use the workbooks found here to examine reference implementataions of both. Using the methods found in the Helper workbook, you can create test arrays and the see how the algorithms perform.
The following resources were consulted and used in the course of making this content.
Mike Bostock's article on Fisher-Yates shuffle Beautiful explanation and visualizations of the shuffle algorithms in action.
The danger of naivete by Jeff Atwood Describes the danger of running an algorithm that seems to be working but is, in fact, biased.
Wikipedia: Fisher-Yates Shuffle
Follow me on Twitter @AndrewJByrne
@Copyright 2016 Andrew J Byrne