Loading page…
Three harder merge problems on sorted lists. The move is to say what one pop does, then push the next item of the same list. The lecture covers the tie rule, empty lists, counting lists without a merged list, and a window over the merged stream.
You know the k-way merge from the Academy: a heap that holds the front of every sorted list.