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