AI Interview Prep is optimized for larger screens
Please open this on a laptop or desktop (1024px and wider) to use the full editor, whiteboard, and AI coaching surface.
Understand the problem
Restate the problem precisely. Interviewers reward candidates who pause, define the contract, and name the guarantees before coding.
You are given two integers `n` and `k` and two integer arrays `speed` and `efficiency` both of length `n` representing the speed and efficiency of `n` engineers respectively. Choose at most `k` different engineers out of the `n` engineers to form a team with the maximum performance. The performance of a team is the sum of their engineers' speeds multiplied by the minimum efficiency among their engineers. Return the maximum performance of this team. Since the answer can be a huge number, return it modulo `10⁹ + 7`.
Once you've drafted a response, click Submit for AI review and a senior engineer will critique your reasoning.