Search
⌘K

Leetcode 857. Minimum Cost to Hire K Workers

Choose k workers and pay each proportional to quality while meeting their minimum wages; the group's cost equals (sum of selected qualities) * max(wage[i]/quality[i]) among them, so minimize this value. The problem reduces to selecting k workers that balance low quality sum against low wage/quality ratios — typically solved by sorting candidates by ratio and greedily keeping the smallest total quality.


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.

Leetcode 857. Minimum Cost to Hire K Workers | Hello Interview