This is a JavaScript implementation of the deterministic directed single-source shortest path algorithm by Duan et al., with a runtime of
Author: Codeclever
npm:
npm install @codeclever/duan-sssp
const{ Graph }=require("@codeclever/duan-sssp");constgraph=newGraph(4);graph.addEdge(0,1,2);graph.addEdge(0,2,5);graph.addEdge(1,2,1);graph.addEdge(1,3,2);graph.addEdge(2,3,1);// Get full shortest pathconstpath=graph.getPath(0,3);// Returns [0, 1, 3]console.log("shortest path",path);This project is published under MIT License.