Psst: Open the JavaScript Console and try to play around with these functions:

Graphs

Graph Traversal

Weighted Graphs

Dijkstra's Algorithm

Bellman-Ford Algorithm

No negative cycle:

With negative cycle: