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: contrib/Data-Structure-Graphs/graph.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Graph is a non-linear data structure consisting of vertices and edges. It is a p
32
32
## Representation of Graphs
33
33
There are two ways to store a graph:
34
34
35
-
1.**Adjacency Matrix**
35
+
1.**Adjacency Matrix:**
36
36
In this method, the graph is stored in the form of the 2D matrix where rows and columns denote vertices. Each entry in the matrix represents the weight of the edge between those vertices.
37
37
38
38
```python
@@ -64,7 +64,7 @@ for row in adj_matrix:
64
64
65
65
```
66
66
67
-
2.**Adjacency List**
67
+
2.**Adjacency List:**
68
68
In this method, the graph is represented as a collection of linked lists. There is an array of pointer which points to the edges connected to that vertex.
0 commit comments