@@ -0,0 +1,1032 @@
+public class Solution %7B%0A    public List%3CList%3CInteger%3E%3E permute(int%5B%5D num) %7B%0A        List%3CList%3CInteger%3E%3E allPerms = new ArrayList%3CList%3CInteger%3E%3E ();%0A        List%3CInteger%3E curPerm = new ArrayList %3C%3E ();%0A        %0A        boolean %5B%5D picked = new boolean%5Bnum.length%5D;%0A        for (int i=0; i%3Cpicked.length; i++)%7B%0A            picked%5Bi%5D = false;%0A        %7D%0A        %0A        permuteRecur(num, picked, 0, allPerms, curPerm);%0A        return allPerms;%0A    %7D%0A    %0A    private void permuteRecur(int %5B%5D num, boolean %5B%5D picked, int numPicked, List%3CList%3CInteger%3E%3E allPerms, List%3CInteger%3E curPerm) %7B%0A        if (numPicked == num.length) %7B%0A            allPerms.add(new ArrayList(curPerm));%0A        %7D%0A        %0A        for (int i=0; i%3Cnum.length; i++) %7B%0A            if(picked%5Bi%5D != true) %7B%0A                picked%5Bi%5D = true;%0A                curPerm.add(num%5Bi%5D);%0A                permuteRecur(num, picked, numPicked+1, allPerms, curPerm);%0A                curPerm.remove(curPerm.size()-1);%0A                picked%5Bi%5D = false;%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Create Permutation.java