public class Solution { boolean used[]; int res[]; int num[]; HashSet> resSet; ArrayList> reslist; public ArrayList> permuteUnique(int[] num) { // Start typing your Java solution below // DO NOT rite main() function used = new boolean[num.length]; res = new int[num.length]; this.num = num; reslist = new ArrayList>(); resSet = new HashSet>(); pu(0); reslist.addAll(resSet); return reslist; } public void pu(int x){ for(int i=0;i y = new ArrayList(); for(int j=0;j