Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ swap
Method
swap
Java/Leetcode/Leetcode287.java:27–31 ·
view source on GitHub ↗
(int[] arr, int a, int b)
Source
from the content-addressed store, hash-verified
25
26
27
static
void
swap(
int
[] arr,
int
a,
int
b){
28
int
temp=arr[a];
29
arr[a]=arr[b];
30
arr[b]=temp;
31
}
32
}
Callers
1
sort
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected