Concept Flow - Merge Two Sorted Linked Lists
Create dummy node
Set current pointer to dummy
Compare heads of both lists
Smaller node
Move current and chosen list pointer forward
Repeat comparison until one list ends
Attach remaining nodes of non-empty list
Return dummy.next as merged list head
We create a dummy node to start the merged list, then repeatedly pick the smaller node from the heads of the two lists, attach it, and move pointers until one list is empty. Finally, attach the leftover nodes.
