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

Function initGraph

javascript/1584-Min-Cost-to-Connect-all-Points.js:16–20  ·  view source on GitHub ↗
(points)

Source from the content-addressed store, hash-verified

14};
15
16const initGraph = (points) => ({
17 graph: new Array(points.length).fill().map(() => []),
18 seen: new Array(points.length).fill(false),
19 minHeap: new MinPriorityQueue()
20})
21
22const buildGraph = (points) => {
23 const { graph, seen, minHeap } = initGraph(points);

Callers 1

buildGraphFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected