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

Function compress

javascript/0261-graph-valid-tree.js:125–125  ·  view source on GitHub ↗
(union, i, head)

Source from the content-addressed store, hash-verified

123};
124
125const compress = (union, i, head) => (union[i] = head);
126
127const find = (union, i, num = union[i]) => {
128 const isEmpty = num === -1;

Callers 2

validTreeFunction · 0.85
findFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected