Merge K Sorted Lists

CodingMedium

Asked by: Jane Street, Citadel

Description

Merge k sorted linked lists into one sorted list. What is the time complexity?

Hints

Hint 1

Use a min-heap.

Hint 2

Pop smallest, push next.

Solution