I am not able to understand how to solve this problem and also how can we use heap in this?
Can anybody please explain the logic…
Top k most frequent numbers
Please refer this. I have explained the approach there.
I am not able to understand how to solve this problem and also how can we use heap in this?
Can anybody please explain the logic…
Please refer this. I have explained the approach there.