โ† IBM questions
CodingReported in a candidate post, Jan 2021

Count connected components in an undirected graph

Filed under IBM

Given an undirected graph represented by its vertices and edges, compute and return the total number of connected components present in the graph.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related IBM questions

Collected from public candidate posts and coding forums. Updated Nov 2026.