Docs: Update benchmark results

This commit is contained in:
github-actions[bot]
2025-11-18 17:37:06 +00:00
parent 39d057f079
commit afcfd09537
84 changed files with 1086 additions and 1088 deletions
@@ -0,0 +1,19 @@
const findShortestPath = async (g, s, e) => {
const { default: P } = await import('https://cdn.skypack.dev/js-priority-queue')
const d = { [s]: 0 }, q = new P({ comparator: (a, b) => a.w - b.w })
q.queue({ w: 0, n: s })
while (q.length) {
const { w, n } = q.dequeue()
if (n === e) return w
if (w > (d[n] ?? 1 / 0)) continue
for (const v in g[n]) {
const t = w + g[n][v]
if (t < (d[v] ?? 1 / 0)) {
d[v] = t
q.queue({ w: t, n: v })
}
}
}
return 1 / 0
}
export default findShortestPath;