Re: [algogeeks] Application of Data Structure System Design

2011-04-06 Thread Ashim Kapoor
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,

Re: [algogeeks] Application of Data Structure System Design

2011-04-06 Thread Ashim Kapoor
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]--;

Re: [algogeeks] Application of Data Structure

2011-02-22 Thread Umer Farooq
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

Re: [algogeeks] Application of Data Structure

2011-02-16 Thread vaibhav agrawal
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

Re: [algogeeks] Application of Data Structure

2011-02-16 Thread yv paramesh
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

Re: [algogeeks] Application of Data Structure

2011-02-16 Thread ankit sablok
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