Skip to content

nirvanarsc/Draw-Algorithms

Repository files navigation

Visualizing Graph Algorithms

About

This project uses D3.js to visualize famous graph algorithms. Loosely based on these samples - 1 and 2. Currently, the following algorithms are available.

  • BFS
  • DFS
  • Dijkstra's algorithm
  • Kruskal's Minimum Spanning Tree

Sample Runs

BFS

Dijkstra

Legend

  • Left clicking a node and holding 'CTRL' allows you to drag the node around.
  • Left click + delete allows you to remove nodes and edges
  • Left click anywhere in the graph to add a new node.
  • Left click a node and hold left click and drag to create a new edge from that node to another node.
  • For weighted graphs - left click an edge + 'Enter' allows you to update the edge's weight.

Actions

TODO

Other algorithms I'm interested in implementing:

  • Bellman-Ford
  • Strongly Connected Components (Tarjan/Kosajaru)
  • Floyd-Warshall
  • Topological Sort (Kahn's Algorithm)
  • Convex hull (Graham Scan/Monotone chain)
  • Prim's MST

About

Draw Algorithms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published