Graphs 0/61

Union-find (DSU): merging disjoint sets · 1 of 2

Union-find basics

Keep groups that only merge as trees in a parent array, and tell whether two elements are connected in a few steps with union by size and path compression.

4,026 words · 18 min read

Difficulty: how hard each problem is if its topic is new to you.

Core 5

Additional practice 2