Graphs
BFS/DFS
MST
Shortest Paths
Miscellaneous
100

The two pieces of a graph

What are vertices and edges?

100

Both of their running time

What is O(V+E)?

100

The names of the two algorithms to solve this problem

What are Prim's and Kruskal's?

100

The names of the three shortest path algorithms

What are topological sort, Dijkstra's, and Bellman-Ford?

100

Topo sort's running time

What is O(V+E)?

200

The two representations of a graph in code

What are adjacency list and adjacency matrix?

200

Algorithm for finding the shortest path from a source vertex to all other vertices in an unweighted graph

What is BFS?

200

What is the running time of MST algorithms?

Prim's: O(E*log(V))

Kruskal's: O(E*log(E))

200

We learned algorithms to calculate the shortest part from _____ to ______?

What are a single source and all other vertices?

200

Name all graph algorithms we've learned that use a regular queue

What are BFS and Bellman-Ford?

300

When there is a path from every vertex to every other vertex

What is connected?

300

Uses a queue to store the potential next vertices to visit

What is BFS?

300

The underlying data structure used in Prim's algorithm

What is a priority queue?
300

For each of the three algorithms, describe a graph where you cannot use it

topo sort - cycle

Dijkstra's - negative edge weights

Bellman-Ford - negative weight cycle

300

Spell the shortest path algorithm for a directed graph with non-negative edge weights

What is Dijkstra's?

400

A graph that is connected and acyclic

What is a tree?

400

DFS uses a stack or _____ to determine the next vertex to visit

What is recursion?

400

The underlying data structure in Kruskal's algorithm

What is union-find?

400

Dijkstra's is most similar to this other algorithm that we've learned this year

What is Prim's?

400

Topo sort can be described as ______ ______ DFS

What is reverse postorder?

500

A set of vertices in a graph that are all connected to each other

What is a connected component?

500

One use of DFS that you cannot use BFS for

What is topo sort?
500

What is the difference between lazy and regular Prim's?

Whether you add edges or vertices to the priority queue

500

What is the best case running time of Bellman-Ford?

O(E)

500

Sort every algorithm we've learned this semester from lowest to highest run time (there are 7/8)

1. BFS/DFS/Topo sort

2a. Prim's/Dijkstra's

2b. Kruskal's

3. Bellman-Ford