Question: Please be sure to answer the question thoroughly and completely. n customers arrived at a bank before opening time. There is only one cashier in
Please be sure to answer the question thoroughly and completely.
n customers arrived at a bank before opening time. There is only one cashier in the bank. An ith customer 1 lessthanorequalto i lessthanorequalto n needs a service time t_i. The task is to order the customers in line to the cashier such that the average waiting time is minimized. The waiting time of a customer is from the opening time of the bank till (s) he leaves the bank. Design a greedy algorithm to compute the optimal order
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
