Friday, March 4, 2011

Shortest Path

New simulator, now: A js implementation of Dijkstra's algorithm. I might refactor it in the future (I will probably use a priority queue instead of two arrays), but it works now so I would like to share with you. 


For the ones that don't know what Dijkstra's algorithm is check this.


I keep using my graph generator so the interface is the same. This script will generate a random weighted graph and find the beth path between two nodes. The path will apear in a pop up in your browser.


Vertex number:
Max edges number:
Path between: and







No comments:

Post a Comment