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