Example of shuffling five letters using Durstenfeld's in-place version of the Fisher–Yates shuffle The Fisher–Yates shuffle is an algorithm for shuffling a finite sequence. The algorithm takes a list of all the elements of the sequence, and continually determines the next element in the shuffled sequence by randomly drawing an element from the list until no elements remain.[1] The algorithm produc
![Fisher–Yates shuffle - Wikipedia](https://cdn-ak-scissors.b.st-hatena.com/image/square/b20a313a223318ec19e434d3210ab6c209f63cd9/height=288;version=1;width=512/https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2F5%2F5b%2FDurstenfeld_shuffle.svg%2F1200px-Durstenfeld_shuffle.svg.png)