Mark As Completed Discussion

Today’s Goal: Make Union–Find your new party trick

By the end, you’ll be able to:

  • Explain what Union–Find is (without hand-waving).
  • Spot when to use it in interviews.
  • Crush “are these two things connected?” problems.

Why this matters (aka: where algorithms meet real life)

Think friend groups at a party. People drift, groups merge, someone asks, “Hey, are Alex and Sam in the same circle?” That’s a connectivity question—and computers get those constantly. We want a fast way to track groups as they form and check if two people belong together.

Enter Union–Find (also called Disjoint Set Union, or DSU): your efficient answer to “together or not?”