You have been given arrival time of orders. There is Talscale Coffee machine which takes order from customer in certain conditions: 1. In 1second, orders should not exceed more than three
2. At any given 10 second slot, orders must not exceed more than 20
3. At any given 100 second slot, orders must not exceed more than 100.
You have to tell how many orders talscale coffee machine rejected ?
eg :-input: 4 ,[1,1,1,1]
output: 1
explanation : 4 orders came in first second so last request has been rejected
Answers
Answered by
0
Answer:
Sach me for the first time I have been working on the website for the last few days ago my and
Answered by
0
Answer:
When the input is , the Talscale coffee machine rejects order.
Explanation:
As per given data,
- In one second, the Talscale coffee machine accepts maximum of three orders. Any order, made beyond three, is rejected.
- Here, the input is given as ; it means, the Talscale coffee machine is given orders in one second. But, the machine accepts maximum of .
- Thus, the first three orders are accepted and the last order is rejected.
Therefore, one order is rejected by Talscale coffee machine.
Similar questions