@@ -0,0 +1,856 @@
+/**%0A * Shuffle a set of numbers without duplicates.%0A * @return the random shuffling of the given array.%0A*/%0Apublic class Solution %7B%0A%0A    int%5B%5D original;%0A    public Solution(int%5B%5D nums) %7B%0A      this.original = nums;%0A    %7D%0A    %0A    /** Resets the array to its original configuration and return it. */%0A    public int%5B%5D reset() %7B%0A      return this.original;%0A    %7D%0A    %0A    /** Returns a random shuffling of the array. */%0A    public int%5B%5D shuffle() %7B%0A      int%5B%5D clone = new int%5Boriginal.length%5D;%0A      for (int i = 0; i %3C clone.length; i ++) %7B%0A        clone%5Bi%5D = original%5Bi%5D;%0A      %7D%0A      int%5B%5D arr = new int%5Bclone.length%5D;%0A      int len = clone.length;%0A%0A      for (int i = 0; i %3C clone.length; i ++) %7B%0A        int index = (int)(Math.random() * (len--));%0A        arr%5Bi%5D = clone%5Bindex%5D;%0A        clone%5Bindex%5D = clone%5Blen%5D;%0A      %7D%0A%0A      return arr;%0A    %7D%0A  %7D%0A%7D%0A

Add shuffle array 384