Search
⌘K

Leetcode 1383. Maximum Performance of a Team

Choose up to k engineers to maximize (sum of chosen speeds) * (minimum efficiency among them). Greedy solution: iterate engineers by descending efficiency while maintaining the k largest speeds (e.g., a min-heap) to update the maximum performance on the fly in O(n log k); return result mod 1e9+7.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.