Also called Disjoint-set forest and Merge-find set.
fresh numbers
The test's questions that a run answers, asked again on new numbers whenever you like. The answer, its working and the reason for every other choice come from union-find's own run on the numbers shown.
choose one
1question 1
Places 1 to 9 start alone. How many links do the joins 3-6, 4-9 and 3-4 follow in all?
the answer, and why
the answer is C
3-6 and 4-9 join leaders, 0 links. 3-4 follows one road from 3 to 6, and one from 4 to 9. That is 2.
if you chose another
AThat counts only the first two joins, which follow nothing.