Union Find Algorithm Leetcode 75