Union Find Questions Leetcode