Objective
If two lists are already sorted, they can be merged into a single sorted one by walking through both with two indexes, without sorting everything again. It is the basis of merge sort.
Instructions
- Read two lines, each with integers already sorted in ascending order and separated by spaces (they may be empty).
- Show the sorted merge, separated by spaces. Do not use
sortedorsort: walk both lists with indexes.
1 4 6
2 3 9
1 2 3 4 6 9
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise