← 💻 Coding & Engineering CraftNEXT IN CODING & ENGINEERING CRAFTRecursion and Divide-and-Conquer→
Core
Union-Find (Disjoint Set Union)
Union-Find (Disjoint Set Union) tracks a partition of elements into groups and answers 'are these two connected?' in near-constant amortized time using path compression and union by rank. Interviews probe it because the naive alternative (re-running DFS or BFS per query) is too slow under repeated merges, and DSU is the right tool for dynamic connectivity, Kruskal's MST, and grouping problems where edges arrive over time.
a free account unlocks the core curriculum tier · no card
RELATED CONCEPTS
PRACTICE THIS IN REAL QUESTIONS
Coding & DSAUnion-Find (Disjoint Set Union): connectivity and grouping.→Coding & DSAKruskal's algorithm: minimum spanning tree via sorted edges and union-find.→Coding & DSAGiven a sorted list of words in an alien language, derive the order of its characters.→Coding & DSAFind the length of the shortest transformation sequence from one word to another (Word Ladder).→
COMPANIES THAT ASSUME THIS
