Skip to content

Commit 84522ba

Browse files
authored
Update README.md and add some description (#5886)
1 parent 8b60485 commit 84522ba

File tree

1 file changed

+36
-1
lines changed
  • src/main/java/com/thealgorithms/datastructures/graphs

1 file changed

+36
-1
lines changed

src/main/java/com/thealgorithms/datastructures/graphs/README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff 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.
8888
2 1 1 0 0 0
8989
3 1 0 0 0 1
9090
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
120+
121+
###Common Graph Problems
122+
123+
Graph Coloring
124+
Finding Bridges and Articulation Points
125+
Finding Strongly Connected Components
126+
Maximum Flow (Ford-Fulkerson algorithm)

0 commit comments

Comments
 (0)