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