MCPcopy 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
60function Swap(arr, x, y) {
61 ;[arr[x], arr[y]] = [arr[y], arr[x]]
62}
63
64export { QuickSelect }

Callers 2

RandomizedPartitionFunction · 0.85
PartitionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected