摘要:
40. 组合总和 II class Solution {//对于【1(a)、1(b)、2】target=3情况,会出现两个(1、2) //所以,应排好序,则相同数必相邻,处理到相邻相同时跳过则可去重 List<List<Integer>> ans = new ArrayList<>(); List< 阅读全文
摘要:
39. 组合总和 class Solution { List<List<Integer>> res = new ArrayList<>(); public List<List<Integer>> combinationSum(int[] candidates, int target) { if(ca 阅读全文
摘要:
47. 全排列 II 1 class Solution { 2 public List<List<Integer>> permuteUnique(int[] nums) { 3 List<List<Integer>> ans = new ArrayList<>(); 4 int[] visited 阅读全文
摘要:
46. 全排列 1 class Solution { 2 public List<List<Integer>> permute(int[] nums) { 3 List<List<Integer>> res = new ArrayList<>(); 4 int[] visited = new int 阅读全文