DSA Factory
Curriculum
Level 4 · Advanced

Union-find

About 10 steps, from the first idea to a mastery test.

  1. Stage 0Groups that mergeFree
    1. 1Are they in the same group?9 min
    2. 2Count the groups7 min
    3. 3Largest group8 min
    4. 4Spotting a redundant link8 min
  2. Stage 1Using groupsFree
    1. 1Union by size10 min
    2. 2Path compression10 min
    3. 3Which cable can be removed?9 min
    4. 4Fewest bridges to connect every island8 min
  3. Stage 2MasteryFree
    1. 1How far would a rumor spread?10 min
    2. 2When did everyone first connect?10 min
Start freeTry a step first