Given an array of integers representing the weights of 27 rare herbs and an array of integers representing the capacities of 18 shelves, determine the optimal arrangement of the herbs on the shelves such that the total weight of the herbs on each shelf does not exceed its capacity.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak