Apex › Storage & databases

Minimum spanning tree

The cheapest set of edges that connects every node. Step through Kruskal (add the cheapest edge that doesn’t close a cycle) or Prim (grow one tree outward) and watch two different greedy strategies land on the same minimum-weight tree.

More in Storage & databases