Shuffle an Array
Given an integer array
nums, write an algorithm to shuffle the array randomly. All permutations of the array should be equally likely.
Implement three functions of the
- Initializes the object with the integer array
- Resets the array to its original configuration and returns it.
- Returns a random shuffling of the array.