Adjacency List Representation of Graph

Adjacency List Representation of Graph: In this post, you will learn how to represent a graph in list form. By using this concept we can easily create the graph.

Adjacency List Representation of Graph

For Undirected Graph:

Matrix Representation of Graphs

There will be 5 node

1 → 2 → 5

2 → 1 → 3

3 → 2 → 4

4 → 3 → 5

5 → 1 → 4

Directed Graphs:

Matrix Representation of Graphs

1 → 5

2 → 1

3 → 2

4 → 3

5 → 4

Shares
facebook sharing button Share
twitter sharing button Tweet
whatsapp sharing button Share
telegram sharing button Share
pinterest sharing button Pin

Leave a Comment