Loading...
Loading...
Loading...
Two warehouses each keep a sorted linked list of item numbers. Merge them into one sorted list by relinking the nodes, and print it.
Example
Input
1 4 9 2 3 10 12
Output
1 2 3 4 9 10 12
Try the problem first. Open one hint at a time.
Use a dummy node and a tail pointer.
When one list ends, attach the rest of the other one.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor