You are given two arrays, `priorities` and `capacities`, where `priorities` represents the priority levels of resources and `capacities` represents the capacities of storage units. Your task is to allocate the resources to the storage units to maximize the overall priority level of the allocated resources. Return the maximum achievable priority level.
Explanation: Allocate resources with priorities 29, 23, 17, and 11 to storage units with capacities 40, 30, 20, and 10 respectively, to achieve a total priority level of 29 + 23 + 17 = 69.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak