Merge and Sort
Basic Accuracy: 39.68% Submissions: 1938 Points: 1

Input N number of arrays and print the merged array in ascending order containing only unique elements.
Input:
The first line consists of T test cases and then next line consists of number of arrays denoted by N and then next of each N lines contain a number n denoting the number of elements in an array.
Output:
Output in one line the merged array sorted in ascending order.
Constraints:
1<=T<=50
1<=N<=4
1<=Ai<=100
Example:
Input:
1
3
3
1 2 8
2
4 9
3
1 2 8
Output:
1 2 4 8 9

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.