Write shuffle(nums, rng), which returns a new array holding the elements of nums in a uniformly random order: every one of the n! orders has probability 1/n!.
rng is a function that returns a number in [0, 1), like Math.random. Use only it for randomness- Use Fisher-Yates from the back, so tests can script the generator: for
i from n - 1 down to 1, draw once and set j = Math.floor(rng() * (i + 1)), then swap positions i and j - That means exactly
n - 1 draws, and none for an array of 0 or 1 elements - Do not change
nums; shuffle a copy