Breadth First Search

1. Which of the following policies does a queue follow?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

2. Which of the following describes a standard graph traversal algorithm?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

3. Consider the following undirected graph:
Vertices, V = [1, 2, 3, 4, 5, 6]
Edges, E = [[1, 2], [1, 3], [2, 4], [2, 5], [3, 5], [3, 6]]
Where each array within E signifies an edge between the two mentioned vertices
Which of the following data structures is represented by the above graph?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

4. Consider the following undirected graph:
Vertices, V = [a, b, c , d, e, f]
Edges, E = [[a, b], [a c], [b, d], [b, e], [c, e], [c, f]]
Where each array within E signifies an edge between the two mentioned vertices.
If we were to store this graph’s vertices in a queue in the order top to bottom(parent to child) and left to right(edges that appear first in the edge matrix appear first in the queue) with ‘a’ as the root, what index would vertex ‘e’ be stored at (assume 0 indexing for the queue and no deletions)?

Explanation

Explanation

Explanation

Explanation