Detect Cycle In A Undirected Graph Leetcode