Search
⌘K

Leetcode 826. Most Profit Assigning Work

Given jobs with difficulty and profit and workers with abilities (each worker can do at most one job but jobs can be reused), maximize total profit by assigning each worker the most profitable job they can handle — this reduces to preprocessing jobs (sort + prefix max) and then matching each worker to the highest-profit job with difficulty ≤ their ability via binary search or a sweep.


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.