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.
Input Format
An Integer n a1 a2..n integers An integer m b1 b2..m integers
Output Format
Check the sample output and question video.
Constraints
1 <= N <= 10^8 -10^9 <= a[i],b[i] <= 10^9
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
4 -2 5 9 11 3 4 6 8
Output
-2 4 5 6 8 9 11