MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / permuteUnique

Method permuteUnique

java/0047-permutations-ii.java:2–8  ·  view source on GitHub ↗
(int[] nums)

Source from the content-addressed store, hash-verified

1class Solution {
2 public List<List<Integer>> permuteUnique(int[] nums) {
3 Arrays.sort(nums);
4 List<List<Integer>> res = new ArrayList<>();
5
6 backtrack(res, nums, new ArrayList<>(), new boolean[nums.length]);
7 return res;
8 }
9
10 public void backtrack(List<List<Integer>> res,
11 int[] nums,

Callers

nothing calls this directly

Calls 1

backtrackMethod · 0.95

Tested by

no test coverage detected