You are on page 1of 2

Assignment No.

03
Spring 2021
CS502- Fundamentals of Algorithms

Student I_D :MC200201675

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

You might also like