this.nums = nums;
I think it is better to do this.nums = nums.clone(); to make a copy of the input int nums. because the input int nums can be used as input for multiple places and it will mess up if you just use reference.
Shuffle an Array
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.