Wrong test input

I need to know if it’s correct

hi @shashank3256 i am not getting your question

I meant, the sample test input given for the problem seems wrong to me. Could you confirm if that’s the case. And if not then can you explain.

hi @shashank3256 the sample input and output are correct

Input:
1
5 2
5 1 3 5 2

here n = 5, k = 2

freq m ap at different points: and output.
(if freq is equal then we pr int the smaller element first)
freq

5 - 1
output:
5
freq
1 - 1
5 - 1
output:
1
5
freq

1 - 1
3 - 1
5 - 1
output:
1
3
freq

5 - 2
1 - 1
3 - 1
output:
5
1
freq

5 - 2
1 - 1
2 - 1
3 - 1
output:
5
1

You can combine all these outputs and see this is what is given in sample output

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.