A graph is a pair (V, E), where V is a set of nodes, called vertices, and £ is a collection of pairs of vertices, called edges.
• Vertices and edges are positions and store elements
-
ordered pair of vertices (u, v)
-
first vertex u is the origin
-
second vertex v is the destination
-
Example: one-way road traffic
-
unordered pair of vertices (u, v)
-
Example: railway lines
-
all the edges are directed
-
Example: route network
-
all the edges are undirected
-
Example: flight network
- Breath First Search ----> C++ | Java | Python
- Depth First Search ----> C++ | Java | Python
- Largest-Cake-Piece ----> C++
- Kruskal Algorithm ----> C++ | Java | Python
- Dijkstra Algorithm ----> C++ | Java | Python
- Strongly Connected Components (Using Kosaraju Algorithm) ----> C++
- Strongly Connected Components (Using Tarjans Algorithm) ----> C++ | Java
- Topological Sort ----> C++ | Java | Python
- Prim's Algorithm ----> C++ | Java | Python
- Negative Cycle In weighted Graph (Using Bellman–Ford algorithm) ---> C++ | Java | Python
- Longest Path in a Directed Acyclic Graph ----> C++ | Java | Python
- Floyd Warshall Algorithm ----> C++ | Java | Python