@Shashank:

well i guess there is one more issue with my algo. if counter is updated
for say number 3.
and heap has already node with value 3 and count 2.

now root could be node with value 5 and count 1.

if i remove root from the heap, then heap will be havingi will be having 2
node with value 3 with count 3 and 2.

On Wed, Dec 21, 2011 at 7:15 PM, WgpShashank <shashank7andr...@gmail.com>wrote:

> @atul approach sounds good but we have to check for each time counts
> updated isn't it  , though even can sort the hash table  & return top k
> number .
> also as i know we have splay tree , even google uses it , to get most
> frequent item .
>
>
> Thanks
> Shashank.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/gucYTW56cCsJ.
>
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to