Concept Flow - Merge K Sorted Lists Using Min Heap
Create min heap
Insert first node of each list
While heap not empty
Extract min node
Add min node to merged list
If min node has next
Insert next node into heap
Back to While heap not empty
Return merged list head
↩Back to While heap not empty
We build a min heap with the first nodes of each list, repeatedly extract the smallest node, add it to the merged list, and insert the next node from that list into the heap until all nodes are merged.
