Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

npm versionlicense: MIT

Duan-SSSP

This is a JavaScript implementation of the deterministic directed single-source shortest path algorithm by Duan et al., with a runtime of $O(m \cdot \log^{2/3} n)$.

Author: Codeclever

Install

npm:

npm install @codeclever/duan-sssp

Usage

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);

License

This project is published under MIT License.

About

JS implementation of Single-Source Shortest Path Algorithm based on Duan Et al. research

Topics

Resources

Code of conduct

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages