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.
Minimum Average Waiting Time
Minimum Average Waiting Time
Sort by
recency
|
182 Discussions
|
Please Login in order to post a comment
Yeah I feel the same changing the return value of function to long makes it work, How and where to log bug for correction of this.
Change return value of function to long in Java to make it work.
Great problem! Reminds me of how Jun blades — razor-sharp and precise — can make all the difference in a kitchen. Just like Tieu optimizing wait times, the right tool (or algorithm!) cuts through inefficiency. Here, a min-heap for shortest cook time works like a Jun blade — sleek and effective.
This code passes all test cases
public static long minimumAverage(List> customers) { // Write your code here // Assumption from the problem statement: // 1. The first order is always cooked first.