摘要: 回溯 public List<List<Integer>> permuteUnique(int[] nums) { List<List<Integer>> result = new ArrayList<>(); boolean[] visited = new boolean[nums.length] 阅读全文
posted @ 2020-07-30 17:33 欣姐姐 阅读(162) 评论(0) 推荐(0)
摘要: 回溯 public List<List<Integer>> permute(int[] nums) { List<List<Integer>> result = new ArrayList<>(); boolean[] visited = new boolean[nums.length]; back 阅读全文
posted @ 2020-07-30 17:08 欣姐姐 阅读(125) 评论(0) 推荐(0)
摘要: public List<List<Integer>> subsetsWithDup(int[] nums) { Arrays.sort(nums); List<List<Integer>> result = new ArrayList<>(); List<Integer> path = new Ar 阅读全文
posted @ 2020-07-30 16:32 欣姐姐 阅读(142) 评论(0) 推荐(0)
摘要: 递归 public List<List<Integer>> subsets(int[] nums) { Arrays.sort(nums); List<List<Integer>> result = new ArrayList<>(); List<Integer> path = new ArrayL 阅读全文
posted @ 2020-07-30 11:46 欣姐姐 阅读(122) 评论(0) 推荐(0)