Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ swap
Method
swap
Java/Leetcode/Leetcode442.java:35–39 ·
view source on GitHub ↗
(int[] arr, int a, int b)
Source
from the content-addressed store, hash-verified
33
}
34
35
static
void
swap(
int
[] arr,
int
a,
int
b){
36
int
temp=arr[a];
37
arr[a]=arr[b];
38
arr[b]=temp;
39
}
40
}
Callers
1
duplicate
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected