Dijkstra
Dijkstra's Algorithm for finding the shortest paths between nodes in a weighted graph.
Install / Use
/learn @thinkphp/DijkstraREADME
Dijkstra
Dijkstra's algorithm, conceived by computer scientist Edsger Dijkstra, is a graph search algorithm that solves in single-source shortest path problem for a graph with non-negative edge path costs, producing a shortest path tree.

How to use
Include the latest version MooTools Framework, then dijkstra.js into the page:
<script src="http://ajax.googleapis.com/ajax/libs/mootools/1.5.0/mootools-yui-compressed.js"></script> <script type="text/javascript" src="dijkstra-min.js"></script>Sample
#JS
var road = [[1, 2, 1],
[1, 3, 9],
[1, 5, 3],
[2, 4, 3],
[2, 3, 7],
[4, 3, 2],
[4, 1, 1],
[5, 2, 4],
[5, 4, 2]]
var start = 1,
end = 3;
var dij = new Dijkstra(start, end, road );
console.log("Cost = " + dij.getCost() )
console.log("Shortest path from the node "+ start + " to "+ end + " -> "+ dij.getShortestPath() )
Problem Set
https://infoarena.ro/problema/dijkstra
References
http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
Related Skills
node-connect
352.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
