New
The Learning module is now live
See what's new
×
Question Bank
Learning
NEW
Pricing
Blog
Forum
HOT
JobRadar
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.4k
/7k
Acceptance Rate
34.7%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.7-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
orders =
k =
Output
Expected