General Flashcards

1
Q

What is an adjacency list?

A

It’s one way to represent a graph. It’s a mapping of vertices to a list of references to other vertices (called edges). You can store edge weight with (weight, vertex) tuples instead.

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

What is an adjacency matrix?

A

X axis: all vertices, Y axis: all vertices. X, Y: a number representing if X is connected to Y. The number can also represent weight! To find which vertices are connected to X, just look at X’s row.

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

Shortest path through a graph? BFS or DFS?

A

BFS.

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

Force quit

A

cmd-opt-esc

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

Debug requests to a port

A

nc -l 4567

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