Difficulty Level: Easy

Submissions: 1422 Accuracy:


Remove duplicates in small prime array (Function Problem)

Given an array of primes your task  is to complete the function removeDuplicate which removes the duplicate element from such array . The function remove duplicate takes two argument one is the array of primes A [ ] and the second argument is the size of the array .

The first line of input contains an integer T denoting no of test case then T test cases follow. Each test case contains two lines . The first line of each test case contains an integer N denoting the size of the array . The next line contains the space separated values of the array A.

For each test case output will be the array with no duplicate elements .

2<=A[i] <=47


2 2 3 3 7 5
2 3 7 5

Note:The Input/Ouput format and Example given are used for system's internal purpose, and should be used by a user for Expected Output only. As it is a function problem, hence a user should not read any input from stdin/console. The task is to complete the function specified, and not to write the full code.

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Amit Khandelwal, Harshit Sidhwa
Author: Shubham Joshi 1

It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use, generate link and share the link here.