This problem asks us to count the number of connected components in an undirected graph. Every time we discover an unvisited node and traverse all nodes connected to it using DFS or BFS, we’ve found ...