?

Algorithms & Data Structures

Free Version

Upgrade subject to access all content

Easy

Finding the Connected Components of a Graph

ALGOR-36M3D3

Which of the following answers best describes the connected components of the undirected graph below?

Ashley Salzetti. Created for Albert.io. Copyright 2016. All rights reserved.

A

The graph consists of one connected component which contains all of the nodes in the graph.

B

The graph consists of three connected components. One connected component contains nodes 1, 3, 4, 6, and 9. Another connected component contains nodes 2, 5, 7, and 8. The last connected component contains node 10.

C

The graph consists of four connected components. One connected component contains nodes 1, 3, and 4. Another connected component contains nodes 3, 4, 6, and 9. A third connected component contains nodes 2, 5, 7, and 8. The last connected component contains node 10.

D

The graph consists of ten connected components, where each connected component consists of one of the nodes in the graph.