MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / permute

Method permute

ArrayPermutation.java:2–6  ·  view source on GitHub ↗
(int[] nums)

Source from the content-addressed store, hash-verified

1class 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];

Callers

nothing calls this directly

Calls 2

swapMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected