Graph Representation Leetcode