Leetcode Disjoint Set Problems