Let’s Do the Knuth Shuffle
I know it sounds like a funky dance move, but the Knuth shuffle is actually an elegant method for randomly rearranging the elements in an array — or, as we Gophers tend to prefer, a slice. The algorithm is very easy to understand and implement, which means that you should be able to use it […]