You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/com/thealgorithms/datastructures/graphs/README.md
+36-1Lines changed: 36 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -88,4 +88,39 @@ It means there are edges from 0 to 1, 2, and 3; from 1 to 0 and 2, and so on.
88
88
2 1 1 0 0 0
89
89
3 1 0 0 0 1
90
90
4 0 0 0 1 0
91
-
```
91
+
92
+
###Graph Terminologies
93
+
94
+
Degree of a vertex: Number of edges that are incident at a vertex.
95
+
Weighted graph: A graph that has weights assigned for each of the edges (used in cases such as shortest path problems).
96
+
Connected components: A set of vertices that can reach others from it but not to those outside this connected component.
97
+
Cycle: A path that begins and ends at the same vertex.
98
+
Bipartite Graph: A graph whose vertices can be partitioned into two disjoint sets, with every edge connecting a vertex in one set to a vertex in the other set.
99
+
100
+
###Graph Algorithms
101
+
102
+
Breadth-First Search: It explores neighbors in layer after layer and applies on shortest path problems for unweighted graphs.
103
+
Depth-First Search (DFS): It continues moving up as far along each branch as possible before backtracking. DFS is typically used for traversing all nodes and testing connectivity.
104
+
Dijkstra's Algorithm: This algorithm finds the shortest path from a single starting vertex to all other vertices in a weighted graph.
105
+
Prim's and Kruskal's Algorithm: To find the minimum spanning tree.
106
+
Bellman-Ford Algorithm: This algorithm solves shortest path problems even when there are negative weights.
107
+
Graph Types
108
+
Multigraphs: Graphs with more edges between the same set of vertices.
109
+
Complete Graphs: A graph in which there is a unique edge between each pair of vertices.
110
+
Planar Graphs: A graph that can be drawn in a plane such that no two edges cross.
111
+
112
+
###Graph Algorithm Applications
113
+
114
+
Google Maps (Dijkstra's Algorithm): How maps apps find shortest routes.
115
+
Job Scheduling: Topological Sort A real application of DAG (Directed Acyclic Graph) to manage the dependency of jobs between tasks.
116
+
Web Crawling: How to use BFS for web crawlers to index pages in search engines.
117
+
Big-O Complexity of Graph Operations
118
+
Adjacency List vs Adjacency Matrix : Provide comparison tables of time complexity for operations such as addition of an edge, checking if an edge exists, etc.
119
+
BFS and DFS Complexity : Describe their computational cost
0 commit comments