#1060Hard#18 in PhonePe's list· asked at 4 companies
Maximum Performance of a Team
Hosted on LeetCode
Solve it on LeetCode, track it here.
This problem's full statement lives on LeetCode. Open it in a new tab, then come back to mark it solved, add notes and keep your streak.
LeetCode Premium locked?
Most company-tagged LeetCode problems are behind Premium. If you have ChatGPT Plus or Claude Pro, ask it for the full statement, examples and constraints. The buttons below open a chat with the prompt already filled in.
What we know
Example 1
Input: n = 6, speed = [2,10,3,1,5,8], efficiency = [5,4,3,9,7,2], k = 2 Output: 60
Engineers 2 and 5 (speeds 10 and 5, efficiencies 4 and 7): (10 + 5) * 4 = 60.
Example 2
Input: n = 6, speed = [2,10,3,1,5,8], efficiency = [5,4,3,9,7,2], k = 3 Output: 68
Example 3
Input: n = 6, speed = [2,10,3,1,5,8], efficiency = [5,4,3,9,7,2], k = 4 Output: 72
Constraints
- •
1 <= k <= n <= 10^5 - •
speed.length == n - •
efficiency.length == n - •
1 <= speed[i] <= 10^5 - •
1 <= efficiency[i] <= 10^8