Going by the hint given in the problem
Divide the stream into windows and assume that we have enough space to store
all the queries from the stream window in a hash table along frequency
count. Also maintain a global Hash table that will contain the frequency
counts of top n queries seen so far.
@Srikar
In your first approach you cant simply ignore the queries that are not
present in the heap because you have a stream of queries and you never know
if the query that you are about to ignore is going be received frequently or
not in future. Your approach is like find the top 100 queries
@algoose I see what you are saying. what do you propose? checking out your
link now...
On Thu, Feb 3, 2011 at 11:44 AM, Algoose chase harishp...@gmail.com wrote:
@Srikar
In your first approach you cant simply ignore the queries that are not
present in the heap because you have a stream of
@guy above juver++
The solution , i don't think can get better than this , because you
need to store the querries anyway (at least for the output )
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to