Union-Find with path compression
Union-Find API which exposes methods for union, find and no. of components.
Tags: replit, java