Given an undirected graph with **n** vertices and a list of edges, return the **number of connected components**.
Interactive graph explorer available!
Switch to the Visualize tab to build a custom graph and animate BFS traversal to test your intuition.