📚 dsaflash.cards
Problems
Log in
Sign up
Home
/
Advanced Data Structures
/
Union-Find (Disjoint Sets)
Union-Find (Disjoint Sets)
Question 1 of 6
In union-find, how do you determine if two elements a and b are in the same set?
A
Check if a and b are adjacent in the parent array
B
Check if rank[a] == rank[b]
C
Call union(a, b) and check if it returns true
D
Check if find(a) == find(b) — their roots are the same
← Back to categories