Assemble a Review Team Maximizing Total Speed Times Minimum Accuracy
Last updated: November 29, 2026
Quick Overview
Each content reviewer has a speed and an accuracy. Choose at most k reviewers to maximize (sum of chosen speeds) * (minimum chosen accuracy).
Meta
November 29, 20260
0
0 solved
Each content reviewer has a speed and an accuracy. Choose at most k reviewers to maximize (sum of chosen speeds) * (minimum chosen accuracy).
Set around staffing Meta's content review queues, this onsite question rewards the sort-then-heap pattern: fix the minimum accuracy by sweeping in descending accuracy, then keep the k fastest seen so far.
What the Interviewer Expects
- Fix the bottleneck (minimum accuracy) by sorting descending
- Maintain the top k speeds seen so far in a min-heap
- Track the running sum of speeds in the heap
- Evaluate the score at every step
- Justify why the sweep covers the optimal team
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- What if you must choose exactly k reviewers?
- What if the objective is sum of accuracy times minimum speed?
- Return the chosen reviewer IDs.
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
- Inputs: arrays
speed,accuracyof length n, andk. - Team size 1 to k.
- Output: maximum
sum(speed) * min(accuracy)(in the classic version, return modulo 10^9 + 7 after maximizing)....
High-Level Design
The objective has a bottleneck term. Consider the optimal team and its least accurate member X. Every other member is at least as accurate as X, and given that X is the minimum, we want the fastest me...