FisherYatesShuffle
The Fisher-Yates shuffle, also known as the Knuth shuffle, is an algorithm for generating a random permutation of a finite sequence. In other words, it's a method for shuffling a list of items randomly so that each possible permutation of the items is equally likely. The algorithm was first described by Richard Durstenfeld in 1938 and later popularized by Donald Knuth.
The core idea of the Fisher-Yates shuffle is to iterate through the sequence from the last element
A common implementation of the Fisher-Yates shuffle proceeds as follows: for i from n-1 down to 1