A simple and visualized method to track and understand the following algorithms.
- BFS
- DFS
- Topologic Sort
- Kosaraju-Sharir
- Kruskal
- Prim
- Dijkstra
- Bellman-Ford
- Floyd-Warshall
- DAG Shortest Path
Use pip to install the required libraries used to run the code.
pip install -r requirements.txt
OR
pip install networkx
pip install matplotlib
pip install tabulate
Run the script and a GUI window will open on what algorithm you wish to run, select one from the list and press 'Next':
- Load Graph: Load a graph from a file.
- Random/Draw: Choose if to get a random graph or if you wish to draw one.
- Save Graph: Choose if you wish to save the graph for the next run/s.
- More fields will show depending on other choices made.
- Left-Click: Create a new Node
- Right-Click: Right-click on a node and then on another node to make an edge between the nodes.
- Save Graph: Close the draw GUI to save the graph and continue the run.
Run the code using a debugger if you wish to track the algorithms.
Graphs are saved in the "Graphs" directory
- BFSVideoExample
- DFSVideoExample
- FloydWarshallVideoExample
- PrimVideoExample
- KruskalVideoExample
- DijkstraVideoExample
- BellmanFordVideoExample
- FordFulkersonVideoExample (Can also be run by Edmonds-Karp)