bloodoath's blog

By bloodoath, history, 4 months ago, In English

Given, two disjoint sets with roots 1 and 6 respectively which already have their childrens' paths compressed.

I wish to do a union but instead of


I want


Unable to figure out a way to do this optimally.

DSU I am using is on cp-algorithms

Full text and comments »

Tags dsu
  • Vote: I like it
  • 0
  • Vote: I do not like it