Lecture 2 - Graph Representations Flashcards

1
Q

How can graphs be represented?

A

Adjacency matrix or adjacency list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a adjacency matrix?

A

A structure with a column per vertex andd row per vertex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an adjacency list?

A

A linked list for each vertex with adjacent vertices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Can a directed graph be represented the same way as an undirected one ?

A

Yes, but only include the verticies adjacent to current, not from.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to implement a graph?

A

Define classes for entries , vertices and graphs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly