We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I get that you cannot see future orders as in the solution must be online, but what's stopping me from delaying an order and not cook any pizzas at the moment to bet on the possibility that it could get me a lower average waiting time?
Example:
2026513
Expected answer is 60/2=30, but if you delay the first customer's order and cook the second customer's pizza first you can get 57/2=28.5.
The expected solution assumes that you should always cook pizzas as long as you have an order, however I do not see this in the problem statement. Am I making any sense?
Minimum Average Waiting Time
You are viewing a single comment's thread. Return to all comments →
I get that you cannot see future orders as in the solution must be online, but what's stopping me from delaying an order and not cook any pizzas at the moment to bet on the possibility that it could get me a lower average waiting time?
Example:
Expected answer is 60/2=30, but if you delay the first customer's order and cook the second customer's pizza first you can get 57/2=28.5.
The expected solution assumes that you should always cook pizzas as long as you have an order, however I do not see this in the problem statement. Am I making any sense?
(Unrelated but what's up with the spam checker?)
EDIT: Found this comment https://www.hackerrank.com/challenges/minimum-average-waiting-time/forum/comments/124605, looks like I'm not alone :)