Loading...
Loading...
Loading...
Two branches each send a list of order amounts already sorted from small to big. Merge them into one sorted list without sorting again. Print the merged list on one line.
Example
Input
3 3 1 4 9 2 3 10
Output
1 2 3 4 9 10
Always take the smaller front item.
Try the problem first. Open one hint at a time.
Keep one position in each list and compare the two front items.
Append the smaller one and move its position. When one list is used up, add what is left of the other.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor