Shortest Path Leetcode Graph Valid Tree