Discrete math · Trees and graph algorithms
Connecting all points at minimum cost is a common network problem, and a simple greedy idea solves it, though greed often fails elsewhere.