Leetcode 2360. Longest Cycle in a Graph | Hello Interview