Given an array of integers which may or may not contain duplicate elements. Your task is to print the array after removing duplicate elements, if present.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains an integer n denoting the size of the array. Then following line contains 'n' integers forming the array.
Output the array with no duplicate element present, in the same order as input.
1 2 3 1 4 2
1 2 3 4
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.