Loading...
Loading...
Loading...
Two branches each have a sorted list of sales amounts. Merge them into one sorted list with one pointer for each list. Print the merged list.
Example
Input
1 4 9 2 3 10 11
Output
1 2 3 4 9 10 11
Try the problem first. Open one hint at a time.
Keep one pointer in each list and take the smaller current value.
When one list runs out, copy the rest of the other.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor