DSU should be implemented with - (path compression OR union by rank) or (path compression AND union by rank)?

Is there any noticeable benefit of using both path compression and union by rank in the same dsu implementation?

You can read about this here.

1 Like