A simple implementation of an Union-find data structure in C++.