publicclassSolution {int[] nums;Random rand;publicSolution(int[] nums) {this.nums= nums; rand =newRandom(); } /** Resets the array to its original configuration and return it. */publicint[] reset() {return nums; } /** Returns a random shuffling of the array. */publicint[] shuffle() {int[] tmp =nums.clone();for (int i =0; i <tmp.length; i++) {int j =rand.nextInt(i +1);swap(tmp, i, j); }return tmp; }privatevoidswap(int[] arr,int i,int j) {int tmp = arr[i]; arr[i] = arr[j]; arr[j] = tmp; }}/** * Your Solution object will be instantiated and called as such: * Solution obj = new Solution(nums); * int[] param_1 = obj.reset(); * int[] param_2 = obj.shuffle(); */