(int[] nums)
| 1 | class Solution { |
| 2 | public List<List<Integer>> permute(int[] nums) { |
| 3 | List<List<Integer>> list = new ArrayList<List<Integer>>(); |
| 4 | permute(nums,0,list); |
| 5 | return list; |
| 6 | } |
| 7 | public static void swap(int nums[],int x,int y) |
| 8 | { |
| 9 | int p = nums[x]; |