0 | 1 | 2 | 3 | |
0 | 0 | 0 | 1 | 1 |
1 | 0 | 0 | 1 | 0 |
2 | 1 | 0 | 0 | 1 |
3 | 0 | 1 | 1 | 0 |
Given the following adjacency matrix:
a. Draw the graph. b. Give the adjacency list of the graph.
Expert Answer
a)
b) Adjacency list of the above graph:
0:0->2->3
1:1->2
2:2->0->3
3:3->1->2