What is the difference between a connected graph and a disconnected graph?

Data Structures Questions



62 Short 41 Medium 47 Long Answer Questions Question Index

What is the difference between a connected graph and a disconnected graph?

A connected graph is a graph in which there is a path between every pair of vertices. In other words, every vertex in a connected graph is reachable from every other vertex.

On the other hand, a disconnected graph is a graph in which there are two or more vertices that are not connected by any path. In other words, there are at least two vertices in a disconnected graph that cannot be reached from each other.