Top "Union-find" questions

A union/find data structure is a data structure used for maintaining a partition of a set.

Union-find data structure

For many problems I see the solution recommended is to use a union-find data structure. I tried to read about …

c++ data-structures union-find
Weighted Quick-Union with Path Compression algorithm

There is a "Weighted Quick-Union with Path Compression" algorithm. The code: public class WeightedQU { private int[] id; private int[] iz; …

java algorithm union-find
Union-find expressed as a social network

This is an interview question that I am trying to answer: Given a social network containing N members and a …

algorithm union-find
Is the Union-Find (or Disjoint Set) data structure in STL?

I would have expected such a useful data structure to be included in the C++ Standard Library but I can't …

c++ stl disjoint-sets union-find
Set union algorithm using vector in C++

I'm only using std::vector in this problem, and I can guarantee no duplicates in each vector (but there isn't …

c++ algorithm vector union-find
Union find implementation using Python

So here's what I want to do: I have a list that contains several equivalence relations: l = [[1, 2], [2, 3], [4, 5], [6, 7], [1, 7]] And I want …

python list union-find
Analyzing Time complexity of union-find Algorithm?

Please give a brief and simple approach to analyzing time complexity of the union-find algo. In the two cases 1. Standard …

algorithm complexity-theory union-find