Given N servers, in 5 minutes interval, every minute, the load is checked and if load is less than 50%, the servers are either reduced to N/2 else they are increased to 2N + 1.
PHP Program
Input : No. of servers (N), server load every minute Output : The number of servers running at the end of 5 minutes
Example:
Input: 2
(2 servers) 10 60 50 15 20 (On 1st minute - 10% load, on 2nd minute - 60% load & so on) Output:
1
(After 5 minute, 1 server is running)
Answers
Answered by
0
Answer:
the gate may kindly be done rkgrvudjfyhendudjfvb the voice is
Similar questions