Updated DisjointSet to use a faster method
Updated DisjointSet to use a faster method