What is the error in this code. it is running fine for sample input. Please tell me the error in my code. Following the link to my code:
Top K most frequent number in a stream(using heap)
Hi @medha.saha0308
Try this testcase :
Input :
2
5 3
5 1 5 2 1
8 3
5 1 3 5 2 1 1 3
Expected Output :
5 1 5 5 1 5 1 2 1 5 2
5 1 5 1 3 5 5 1 3 5 1 2 1 5 2 1 5 2 1 3 5
Your Output :
5 1 5 5 1 5 5 1 2 1 5 1
5 1 5 1 3 5 5 1 3 5 1 2 1 5 1 1 1 5 1 1 3
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.