BETA

Difficulty Level: Basic

Submissions: 1445 Accuracy:

22.01%

First K natural numbers
     

Given an array of size n and a number k, we need to print first k natural numbers that are not there in given array.

Input:
First line consists of T test case. First line of every test case consists of N and K. Second line consists of elements of array.

Output:
Single line output, print the K missing numbers.

Constraints:
1<=T<=100
1<=N<=10^4
-1000<=Ai<=1000

Example:
Input:

2
3 3
1 4 3
3 3
-5 -6 1
Output:
2 5 6 
2 3 4 

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

Contributor: Saksham Raj Seth

Set Default Code

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

Compilation/Execution Result:

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