Skip to content

Commit fde4e57

Browse files
committed
Graph Representations
1 parent 652ecfc commit fde4e57

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

33-Graphs_(Part-I)/GraphsP1.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ public static void main(String[] args) {
2727
*
2828
* 2. Un-Weighted
2929
* Ex: Weight of Edge = None
30+
*
31+
* Graph Representations (Storing a Graph) --------------------------------
32+
* 1. Adjacency List (Important) -> Array<ArrayList><Edge><src,dest,wt> , TC -> O(K) where K is your neighbours length
33+
* 2. Adjacency Matrix -> (i,j) connect sotre 1 ya weight otherwise store 0 , TC -> O(V) where V is vertices count
34+
* 3. Edge List
35+
* 4. 2d Matris (Implicit Graph)
3036
*/
3137

3238
}

0 commit comments

Comments
 (0)