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]--;

[algogeeks] Application of Data Structure & System Design

2011-03-29 Thread bittu
Pretend you work for a phone company. At your company, you have a satellite that routes phone calls. We want to bill customers by the maximum number of simultaneous phone calls they make in a single day. ( clarifying questions with the following information: assume no calls last more than 24 hours

[algogeeks] Application of Data Structure & System Design

2011-03-29 Thread bittu
Pretend you work for a phone company. At your company, you have a satellite that routes phone calls. We want to bill customers by the maximum number of simultaneous phone calls they make in a single day. (After asking clarifying questions I received the following information: assume no calls last m