QUIZ: CF_W22
◀ BACK WEEK 22
3 QUESTIONS
Q1 1 / 3 medium
Disjoint Set Union (DSU)

Given n elements and a series of "merge set of element a with set of element b" and "are a and b in the same set?" queries, answer them efficiently.

What is the key data structure and what are the two critical optimizations?