'Algorithm to find minimum number of days to color boxes by one or more robots
I have n boxes which should be colored. Each day robot can color one box or generate another robot, who works exactly as his parent starting next day.
i.e., if on Sunday I have one robot and 10 balls, on Monday:
There is one robot, 1 colored boxes and 9 uncolored boxes, or
There are 2 robots and 10 uncolored boxes.
I need to find the minimum number of days to color all boxes.
I thought to solve that using dynamic programming:
T(n,1) = min(T(n-1,1) + 1, T(n,2))
But I am not sure how to create a DP matrix and if DP is correct approach at all.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
