Hi there!
I just encountered a problem on a forum seemingly uses DSU, but there is a query that makes me question my DSU.
There are a number n and n numbers that follow. There are 3 queries: + Put a and b together + Seperate a and b + Determine whether a and b is connected
I am thinking of a reverse-DSU technique.
Please help!
P/S: Thank you!
Rollback DSU
Also instead of saying "put A and B together", "merge/join A and B together" will be more formal.
thank you! i actually meant that but you noticed it first.