MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / swap1

Function swap1

javascript/0048-rotate-image.js:24–28  ·  view source on GitHub ↗
(matrix, row, col)

Source from the content-addressed store, hash-verified

22};
23
24var swap1 = (matrix, row, col) =>
25 ([matrix[row][col], matrix[col][row]] = [
26 matrix[col][row],
27 matrix[row][col],
28 ]);
29
30var reflect = (matrix) => {
31 const rows = matrix.length;

Callers 1

transposeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected