This commit is contained in:
nim-ka
2022-11-25 23:12:04 +00:00
parent 7ec385d599
commit 1083edf807
13 changed files with 111 additions and 1278 deletions

View File

@@ -77,6 +77,8 @@ Node = class Node {
let visited = {}
let toVisit = [this]
let i = 0
while (toVisit.length) {
let toVisitNew = []
@@ -92,13 +94,16 @@ Node = class Node {
})
toVisit = toVisitNew
console.log(toVisit.length)
if (++i % 100 == 0) {
console.log(toVisit.length)
}
}
console.timeEnd("heap gen")
console.time("search")
let i = 0
i = 0
while (heap.data.length) {
let min = heap.extract()