Puts the elements of list in a random order, in place, using the Fisher–Yates method: every
permutation is equally likely when random is uniform. random is called max(size − 1, 0)
times and must return a number in [0, 1); pass a seeded generator for a repeatable order. The
default, Math.random, is not cryptographically secure. Elements are written with set, so
open iterators and cursors stay valid.
Puts the elements of
listin a random order, in place, using the Fisher–Yates method: every permutation is equally likely whenrandomis uniform.randomis called max(size − 1, 0) times and must return a number in[0, 1); pass a seeded generator for a repeatable order. The default,Math.random, is not cryptographically secure. Elements are written withset, so open iterators and cursors stay valid.Time: O(n).