Shuffles & randoms
I was asked a question about shuffling yesterday which got me thinking. How do you write an algorithm to truly shuffle a deck of cards without any bias? There are a couple of well-known algorithms to do this, both popularized by Donald Knuth. At a very abstract high-level they are: generate a random number for… Read More »