Apex › Storage & databases

Union-Find (Disjoint Set Union)

Track groups and answer "are these two connected?" in near-constant time. Click elements to union their sets and watch the components merge — the engine behind Kruskal's MST and connectivity queries.

More in Storage & databases