MCPcopy Create free account
hub / github.com/codedecks-in/LeetCode-Solutions / swap

Method swap

Java/Perm_Recus.java:27–32  ·  view source on GitHub ↗
(int[] nums, int i, int j)

Source from the content-addressed store, hash-verified

25}
26
27private void swap(int[] nums, int i, int j)
28{
29 int temp = nums[i]; //temp temporarily holds the value of nums so that i & j values can be exchanged
30 nums[i] = nums[j];
31 nums[j] = temp;
32}

Callers 1

helperMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected