(int[] nums)
| 4 | class Solution { |
| 5 | |
| 6 | public List<List<Integer>> permute(int[] nums) { |
| 7 | List<List<Integer>> ans = new ArrayList<>(); |
| 8 | function(ans, nums, 0); |
| 9 | return ans; |
| 10 | } |
| 11 | |
| 12 | public void function(List<List<Integer>> ans, int[] arr, int start) { |
| 13 | if (start == arr.length) { |