Problem 857 · Hard

Minimum Cost to Hire K Workers

Sort by wage-to-quality ratio and keep the k smallest qualities in a max-heap.

Open the interactive visualisation