'Most optimal algorithm to pick things from a list/pool?
I have a list of fruits ['Apple', 'Banana', 'Orange', 'Grape']
Person A wants to take Apple and Banana
Person B wants to take Apple and Banana and Orange
Person C wants to take Orange and Grape
If a fruit you want is taken, you cannot pick take any fruits at all. For example, the possible solutions for this are:
Person A and Person C takes all the fruits (most optimal)
Person B takes Apple, Banana, Orange
The goal is to take the most number of fruits (solution 1), is there an algorithm for figuring that out without trying all the combinations?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
