Number of Connected Components
Difficulty: Medium
Given n nodes and a list of undirected edges, find the number of connected components in the graph.
Difficulty: Medium
Given n nodes and a list of undirected edges, find the number of connected components in the graph.