add quick-find, quick-union algorithms