Search
⌘K

Leetcode 1792. Maximum Average Pass Ratio

Given classes with current pass/total counts and some extra students who always pass, assign the extras to maximize the overall average pass ratio; the core challenge is greedily choosing which class gets each extra by repeatedly picking the class with the largest marginal increase in pass ratio (use a max-heap to do this efficiently for up to 1e5 extras).


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.