Problem library

Fastest Laps

Medium
heapk-way merge

Each list in laps holds one driver's lap times in milliseconds, already sorted from fastest to slowest. Return the k fastest lap times across all drivers, fastest first. If there are fewer than k laps in total, return all of them.

Examples

Input: laps = [[61000,62500],[60500,64000],[63000]], k = 3
Output: [60500,61000,62500]