Union Find with weighted quick-union algorithm and path compression.
Primary LanguageJavaMIT LicenseMIT