Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/patnaikankit/graph-and-trees

Templates for the most important algorithms used in graph and trees.
https://github.com/patnaikankit/graph-and-trees

Last synced: about 1 month ago
JSON representation

Templates for the most important algorithms used in graph and trees.

Awesome Lists containing this project

README

        

Graph:

* If you don't care about length of the path - DFS

* If you want to travel limited/ Shortest path - BFS

* DAG - Topo sort (sometimes with dp)

* Weighted directed/undirected shortest path - Dijkstra

* (-ve) wt - Bellman ford

* All pairs of shortest path - Floyd Warshall

* If you want to find if two node belong to the same component in constant time - DSU