Back to problems

Code Craft: Chef Skill → Dish Profit Assignment

Algorithm · DoorDash · Medium

Requirements Given chefs, difficulties, and profits: chefs contains the skill level of each chef. difficulties describes the difficulty of each dish. profits stores dish profit by difficulty index. Each chef can prepare at most one dish. A chef may prepare a dish only when the dish difficulty is no greater than that chef's skill. The same dish may be assigned to multiple chefs. Return the greatest total profit obtainable from all chef assignments. Use the following call…

Checking your access…