GIven two different arrays A and B your task is to merge the two arrays which are unsorted into another array which is sorted.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The first line of each test case contains the integers N and M denoting the size of arrays A and B respectively.
The second line of each test case contains N space separated integers denoting elements of the array A[ ].
The third line of each test case contains M space separated integers denoting elements of the array B[ ].
Print the merged and sorted array with space between each element. Print the answer for each test case in a new line.
1<= T <=100
1<= N, M <=10000
0<= A[ ], B[ ] <=100000
10 5 15
20 3 2
2 3 5 10 15 20
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.