Closed vielmetti closed 4 years ago
noting the algorithm here https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle?oldformat=true
and Rosettacode gives it as "Knuth shuffle" https://www.rosettacode.org/wiki/Knuth_shuffle
There is a version in Go that prints a single line from a standard Unix formatted fortune file.
nah
with code pulled from this shuffle
https://www.calhoun.io/how-to-shuffle-arrays-and-slices-in-go/