Algorithm Designa60a_q3_component

Connected Component

0bbcad1d-7917-4209-8a27-a548c72b5cf5.cppC++
1// Loading code...

Selected Submission

100 / 100
0.014s
3616 KB
BFS/DFSGraph
Time Comp.
O(V + E)
Space Comp.
O(V + E)
Readability
5/10

"The code performs a Depth-First Search (DFS) on a graph represented by an adjacency list to count the number of connected components. It iterates through unvisited nodes and explores their reachable nodes until no more unvisited nodes are reachable from the current component."

History

AttemptPoints Time
Try #31003/19/2025
Try #21003/19/2025
Try #11003/19/2025