Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/neetcode-gh/leetcode
/ swap
Function
swap
javascript/0937-k-closest-points-to-origin.js:44–45 ·
view source on GitHub ↗
(points, left, right)
Source
from the content-addressed store, hash-verified
42
};
43
44
const
swap = (points, left, right) =>
45
([points[left], points[right]] = [points[right], points[left]]);
46
47
const
squareRoot = ([x, y]) => x * x + y * y;
48
Callers
1
getMid
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected