Merge Two Sorted Lists
Linked lists · Build with a moving tail · Easy · about 20 min
Why it matters
A dummy node removes special cases and makes list code calmer.
How it connects
You rewired one list. Now use a tail pointer to weave two sorted lists together.
Try first
What pointer should always refer to the last node in your merged answer?
Interview cue
The dummy node gives one uniform append operation; each list node is visited once.