Skip to content

q07ListBfsOrder

solutions.q07ListBfsOrder

Question 7

If the following paths completely describe a given undirected graph, show one possible order of nodes visited through BFS.

\(M-N-O-P-Q\)
\(N-Q-M-R\)

Functions:

Name Description
q07ListBfsOrder

Args:

q07ListBfsOrder(vPaths)

Parameters:

Name Type Description Default
vPaths List[List[int]]

List of paths. Each path is a list of vertex indices.

required