Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
27
private
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
helper
Method · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected