Union-Find · Compound Engineer

Union-Find

Keep track of which items belong together as links arrive, in almost constant time. Parent pointers, union by size, path halving, and why it beats searching again after every link.

DSAFreeIntermediateStep-through playerBy Aayush Ostwal
Spotted a mistake in this lesson?Report an issue →