Detect Cycle In Graph Leetcode