Using the above graph, find the following (no programming needed):
Find the adjacency matrix of the graph.
Draw the adjacency list of the graph.
List the nodes of the graph in a depth first traversal.
List the nodes of the graph in a breadth first traversal.
Adjacency matrix:
0 1 1 1 0 0
0 0 0 0 1 0
0 1 0 0 1 0
0 0 0 0 0 0
0 0 0 0 0 0
0 1 0 1 0 0
Adjacency list:
0 -> 1,2
1 -> 4
2 -> 1,4
3 -> -
4 -> -
5 -> 1,3
dfs:
0,1,4,2,3
bfs:
0,1,2,3,4
Just wanna know if i did this correct or should i restart. thanks