Hamiltonian Cycle Leetcode