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