Merge Two Sorted Arrays
easy
1. You are given two sorted arrays(a,b) of integers. 2. You have to merge them and form one sorted array. 3. You have to do it in linear time complexity.
Constraints
1 <= N <= 10^8 -10^9 <= a[i],b[i] <= 10^9
Format
Input
An Integer n a1 a2..n integers An integer m b1 b2..m integers
Output
Check the sample output and question video.
Example
Sample Input
4
-2
5
9
11
3
4
6
8
Sample Output
-2
4
5
6
8
9
11
Question Video