Professional Documents
Culture Documents
03
Spring 2021
CS502- Fundamentals of Algorithms
Question No:1
Solution:
Adjacency Matrix
1 2 3 4 5
1 0 1 0 0 1
2 0 0 1 1 0
3 0 0 0 0 0
4 0 0 1 0 0
5 0 0 0 1 0
Adjacency List
1 2 55 5
2
3 4
4
3
5
4
Question no.2
Solution