Merge K Sorted Lists (LC #23) is a top Meta question. Use a min-heap containing one node from each list. Pop the smallest, add its next node to the heap. Continue until the heap is empty. This runs in where is total nodes and is number of lists. Space is for the heap. Meta asks variants: merge arrays instead of linked lists, implement as an iterator class, exclude duplicates while merging. The heap approach generalizes to any "merge k sorted sequences" problem.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/meta-interview-prep/sorting-searching/merge-k-sorted-lists
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████████████████████████████████████████████████████████████████████████████