The Union-Find Data Structure in Swift

Image by Giorgio Trovato

Before we start

Prerequisites

Keywords and Terminology

The Union-Find Data

The background

Disjoint sets

Transitive Property of Equality

if a = b and b = c, then a = c

Approach to relevant problems

My Node Class

The Union-Find Data Structure

The UnionFind class

Conclusion

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store