AndrewJByrne / shuffle-101

Shuffle 101 course workbooks and assets.

Home Page:https://mix.office.com/watch/1l1vid2vugxve

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

shuffle-101

An introduction to shuffling algorithms

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.

Screenshot of Shuffle 101 class

Table Of Contents

Fisher-Yates Shuffle

Knuth-Durstenfeld Shuffle

Helper Workbook

References

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.

Rosetta Code: Knuth Shuffle

Wikipedia: Fisher-Yates Shuffle

Follow me on Twitter @AndrewJByrne

Copyright

@Copyright 2016 Andrew J Byrne

About

Shuffle 101 course workbooks and assets.

https://mix.office.com/watch/1l1vid2vugxve

License:MIT License