Loading...
Loading...
Loading...
Two shops each have a price list already sorted from low to high. Print one combined list, also sorted from low to high, using the two-pointer merge.
Example 1
Input
1 4 9 2 3 10 11
Output
1 2 3 4 9 10 11
Example 2
Input
5 5
Output
5 5
Try the problem first. Open one hint at a time.
Keep one pointer in each list.
When one list ends, append the rest of the other.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor