Computer Science, asked by navaneeth641, 1 month ago

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 artisinngh8738046191
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 kodurichandu13
0

Answer:

When the input is 4, the Talscale coffee machine rejects 1 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 4; it means, the Talscale coffee machine is given 4 orders in one second. But, the machine accepts maximum of  3.
  • Thus, the first three orders are accepted and the last order is rejected.

Therefore, one order is rejected by Talscale coffee machine.

Similar questions