Each player is assigned an id. Depending on his performance his score will
change.
Depending on his score, other players score his rank will change. What is
efficient data structure to support following queries. Score updates are
frequent as palyers keep playing.
int rank( int player_id);
int
Google has many visitors to its site. And it tracks what pages the
customers visited, etc and other stuff. Lets say you store the data of
customer id and the page id as a record in a log-file. Now assuming
that you have created one log file for each day with that above data-
format. Give me the
Use hash table with customer ID as key.
There can be three components in value: 1. num_days 2. pages 3. flag
For each line, calculate hash, find value for given key.
Increment appropriate values (i.e. pages or num_days).
If num_days 1 pages 1, add this customer to result array, mark
this
what do you think is the best data structure, that also scales with
number of dimensions. i implemented m-tree last but it is hopeless!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post