This was an exercise as part of Princeton online Algorithms course.
This was an exercise as part of Princeton online Algorithms course. It explores applications for the union-find algorithm