Weighted Quick-Union with Path Compression (WQUPC) is my implementation of a disjoint-set data structure in C++.
I wrote this after taking the Coursera Algorithms 1 class from Princeton University. The class is done in Java, so for fun I decided to write up an implementation in C++.
I thoroughly enjoyed the class and would recommend it to anyone wanting to brush up on their algorithm skills.
This is a mini-library consisting of a single class WQUPC
. It uses
GNU Autotools and provides a pkg-config file for client ease of use.
The tiny test suite uses Google Test. Make sure you have the proper include and library paths in CXXFLAGS and LDFLAGS, respectively.
Professor Sedgewick uses the method name union
, which of course is a keyword in C++. I therefore opted to use the name join
instead.
Produced with the greatest editor in history.
Double-space
Post full stop
Proper and Correct
Just ask your Pop
- Burma Shave