int max_calls[no_of_customers][30];
On any phone call -- max_calls[customer_id][day]++;
On hangup -- max_call[customer_id][day]--;
This would store max calls for each customer on each day. Does the length of
the call have to be taken into account ? Your question is not clear on that.
On Tue,
no this is wrong. maintain 2 arrays
int max_calls[no of cust][31]
int current_no_of_calls[no of customers]
both array of customers are initialized to zero.
on call
current_no_of_calls[cust_id]++;
if above max[id][day] then max_calls[id][day] = above
on hangup
current_no_of_calls[cust_id]--;
Hash.
On Wed, Feb 16, 2011 at 9:45 PM, yv paramesh yv.param...@gmail.com wrote:
build a tree
On Wed, Feb 16, 2011 at 10:10 PM, vaibhav agrawal agrvaib...@gmail.com
wrote:
Hash, SortedSet
On Wed, Feb 16, 2011 at 9:58 PM, bittu shashank7andr...@gmail.com
wrote:
Given a set of words
Hash, SortedSet
On Wed, Feb 16, 2011 at 9:58 PM, bittu shashank7andr...@gmail.com wrote:
Given a set of words one after another, give a data structure so that
you,will know whether a word has appeared already or not.
Thanks
Shashank
--
You received this message because you are subscribed
build a tree
On Wed, Feb 16, 2011 at 10:10 PM, vaibhav agrawal agrvaib...@gmail.com wrote:
Hash, SortedSet
On Wed, Feb 16, 2011 at 9:58 PM, bittu shashank7andr...@gmail.com wrote:
Given a set of words one after another, give a data structure so that
you,will know whether a word has appeared
trie construction would do for this
On Wed, Feb 16, 2011 at 10:15 PM, yv paramesh yv.param...@gmail.com wrote:
build a tree
On Wed, Feb 16, 2011 at 10:10 PM, vaibhav agrawal agrvaib...@gmail.com
wrote:
Hash, SortedSet
On Wed, Feb 16, 2011 at 9:58 PM, bittu shashank7andr...@gmail.com