OracleOA #9
Merge 2 Arrays
估计简单可在线判题
考点(AI 标注)双指针滑窗
Merge two non-decreasing arrays into one non-decreasing array, keeping all duplicate values.
输入格式
The first line contains the common length n, followed by two lines each with n integers. Full original bounds: 1<n≤100000, 0≤element≤10^9, and each array is non-decreasing.
输出格式
Output the 2n merged integers, separated by spaces. The original return signature int[n] does not match the statement, so all 2n items are kept here as the statement requires.
样例 1
输入:
3
1 2 3
2 5 5
输出:
1 2 2 3 5 5
样例 2
输入:
2
0 0
0 1
输出:
0 0 0 1
样例 3
输入:
2
4 5
1 3
输出:
1 3 4 5
样例说明
The outputs of the three public examples are, in order: 1 2 2 3 5 5; 0 0 0 1; 1 3 4 5. They were verified by independent enumeration or direct simulation.