← Wells Fargo questions
CodingReported in a candidate post, Sep 2020

Connected Components in a Graph

Filed under Wells Fargo · Also reported at Cognizant, Navi

Given an undirected graph, find all connected components. Discuss the trade-offs between using Breadth-First Search (BFS) and Depth-First Search (DFS) for this task.

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 Wells Fargo questions

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