Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Iterate on the customers, maintaining the time the chef will finish the previous orders.
If that time is before the current arrival time, the chef starts immediately. Else, the current customer waits till the chef finishes, and then the chef starts.
Update the running time by the time when the chef starts preparing + preparation time.