Create a function that receives an array of integers as input, and each time it's called, it returns the same array but with the elements in a random order. Each possible scrambled array should have the same probability.
Anonimo
I randomized an index from 0 to n - 1, and swapped the element at array[index] with array[n - 1]. Then randomized an index from 0 to n - 2, and swapped the element at array[index] with array[n - 2], and so on...