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

Method swap

ArrayPermutation.java:7–12  ·  view source on GitHub ↗
(int nums[],int x,int y)

Source from the content-addressed store, hash-verified

5 return list;
6 }
7 public static void swap(int nums[],int x,int y)
8 {
9 int p = nums[x];
10 nums[x] = nums[y];
11 nums[y] = p;
12 }
13 public static void permute(int nums[],int index,List<List<Integer>> list)
14 {
15 if(index==nums.length-1)

Callers 1

permuteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected