New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Coding Question
AI Insights
Quick Summary
Simulate order processing across multiple shoppers to calculate average customer wait times.
Determine the minimum number of shoppers required to keep the average wait time at or below a threshold k.
Return -1 if the inherent duration of orders makes the target average unattainable regardless of shopper count.
What This Tests
Monotonic property identification for optimization problems
Priority queue simulation for resource allocation
Binary search over a discrete solution space
Feasibility bounding and edge case handling
Common Patterns
Binary Search on Answer
Heap / Priority Queue
Sorting
Greedy
Collapse
Hint 1
Hint 2
Hint 3
What Interviewers May Ask Next
Accepted
2.3k
/6.5k
Acceptance Rate
35.5%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
orders =
k =
Output
Expected