2
public List<List<Integer>> combinationSum2(int[] candidates, int target) {3
List<List<Integer>> res = new ArrayList<>();4
List<Integer> path = new ArrayList<>();6
Arrays.sort(candidates);7
boolean[] visited = new boolean[candidates.length];8
helper(res, path, candidates, visited, target, 0);13
List<List<Integer>> res,20
res.add(new ArrayList<>(path));27
for (int i = currIndex; i < candidates.length; i++) {31
if (i > 0 && candidates[i] == candidates[i - 1] && !visited[i - 1]) {34
int curr = candidates[i];37
helper(res, path, candidates, visited, remain - curr, i + 1);38
path.remove(path.size() - 1);