Algorithms, Part 1 by Kevin Wayne, Robert Sedgewick, Python Version
Union-find set, support two operations:
- union, which join two subsets into one set;
- find, which determine which subset a particular element is in.
Implementing stack with a resizing array.
Implementing queue with a resizing array.