MCPcopy 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
44const swap = (points, left, right) =>
45 ([points[left], points[right]] = [points[right], points[left]]);
46
47const squareRoot = ([x, y]) => x * x + y * y;
48

Callers 1

getMidFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected