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
Coding & Algorithms
Software Engineer
Meta
November 29, 2026
Software Engineer
Onsite
Coding & Algorithms
Hard

0

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
sorting
min-heap
greedy sweep
top-k
bottleneck optimization
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. 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 Problems
Sample Answer
Requirements
  • Inputs: arrays speed, accuracy of length n, and k.
  • 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...


Submit Your Answer
Markdown supported