New update is available. Click here to update.

Last Updated: 27 Nov, 2020

Difficulty: Moderate

```
The first line contains ‘T’, denoting the number of test cases.
The first line of each test case contains two integers, ‘N’ and ‘X’, denoting the number of boxes and the target, respectively.
The second line of each test case contains an array ‘choco’ of ‘N’ space separated integers, denoting the number of chocolates in each box.
```

```
For each test case, print an array of integers denoting the number of chocolates in the boxes that Alex will pick.
```

```
You are not required to print the expected output. It has already been taken care of. Just implement the function.
```

```
1 <= T <= 5
1 <= N <= 10^5
1 <= X <= 10^9
1<= choco[i] <= 10^4
Where ‘T’ is the number of test cases, ‘N’ is the number of boxes, ‘X’ is the target, and ‘choco[i]’ is the number of chocolates in the box ‘i’, where 0 <= i <= N - 1.
Time Limit: 1 sec
```

SIMILAR PROBLEMS

Merge Two Sorted Arrays Without Extra Space

Posted: 19 Nov, 2022

Difficulty: Moderate

Three Sum

Posted: 24 Nov, 2022

Difficulty: Moderate

Ninja And The Strictly Increasing Array

Posted: 27 Nov, 2022

Difficulty: Moderate

Negative To The End

Posted: 16 Dec, 2022

Difficulty: Easy

Sort 0s, 1s, 2s

Posted: 24 Dec, 2022

Difficulty: Easy

Popular Interview Problems: