aboutsummaryrefslogtreecommitdiff
path: root/2022/16-proboscidea-volcanium/first.js
diff options
context:
space:
mode:
Diffstat (limited to '2022/16-proboscidea-volcanium/first.js')
-rw-r--r--2022/16-proboscidea-volcanium/first.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/2022/16-proboscidea-volcanium/first.js b/2022/16-proboscidea-volcanium/first.js
index a7274aa..504ad54 100644
--- a/2022/16-proboscidea-volcanium/first.js
+++ b/2022/16-proboscidea-volcanium/first.js
@@ -18,8 +18,7 @@ fs.readFileSync("input", "utf8")
rate: a[2],
computePathCostTo: function (target) {
Object.values(valves).forEach(v => v.cost = 0);
- let nq = new PriorityQueue();
- nq.enqueue(this, 0);
+ let nq = new PriorityQueue(this);
while (true) {
let n = nq.dequeue();
if (n.element.label === target) {