Merge k sorted lists into one: a min-heap holds each list’s head, and its root is always the next value out. O(n log k), against O(n log n) for putting everything in one array and sorting it.
This interactive visualization needs JavaScript.