I am unable to resolve compilation error. Please help
Top k most frequent number in stream
The process to make a custom comparator for a priority queue is different.
You would have to do make a custom class for it. It must be taught in the lecture videos. Please refer that.
Or refer this article https://www.geeksforgeeks.org/stl-priority-queue-for-structure-or-class/
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.