Concept Flow - Merge K Sorted Lists Using Min Heap
Create min heap
Insert first node of each list into heap
While heap not empty
Extract min node from heap
Add extracted node to merged list
If extracted node has next, insert next into heap
Repeat until all nodes merged
Return merged list head
Start by putting the first node of each list into a min heap. Then repeatedly take the smallest node from the heap, add it to the merged list, and if that node has a next node, add it to the heap. Continue until all nodes are merged.
