Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/JavaScript
/ Swap
Function
Swap
Data-Structures/Array/QuickSelect.js:60–62 ·
view source on GitHub ↗
(arr, x, y)
Source
from the content-addressed store, hash-verified
58
}
59
60
function
Swap(arr, x, y) {
61
;[arr[x], arr[y]] = [arr[y], arr[x]]
62
}
63
64
export
{ QuickSelect }
Callers
2
RandomizedPartition
Function · 0.85
Partition
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected