Minimum Storage Capacity
Within the Amazon Gaming Distribution System, a logistics coordinator is faced with the task of efficiently distributing a collection of n computer games among k different children. Each game is characterized by its size, denoted by gameSize[i] for 1 ≤ i ≤ n.
To facilitate the distribution process, the coordinator opts to utilize pen drives, ordering k pen drives with identical storage capacities. Each child can receive a maximum of 2 games, and every child must receive at least one game, also no game should be left unassigned.
Considering the impracticality of transferring large game files over the internet, the strategy involves determining the minimum storage capacity required for the pen drives. A pen drive can only store games if the sum of their sizes does not exceed the pen drive's storage capacity.
What is the minimum storage capacity of pen drives that you must order to be able to give these games to the children?
1Example 1
Constraints
Limits and guarantees your solution can rely on.
🍇🍇