3 ms·
Also known as card deck shuffle, but indeed I have always known it as Knuth. As for peers part, perhaps they use a library function - Java has java.util.Collec
by xxs 7y ago
Also known as card deck shuffle, but indeed I have always known it as Knuth.
As for peers part, perhaps they use a library function - Java has java.util.Collections.shuffle. OTOH is a single line, provided the generator can produce a random number [0-n).