We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Representing Graphs

Adjacency Matrix

0 1 2 3 4
0 false true false false true
1 true false true true true
2 false true false true false
3 false true true false true
4 true true false true false

Adjacency List

0 connects with 1 4
1 connects with 0 2 3 4
2 connects with 1 3
3 connects with 1 2 4
4 connects with 0 1 3