1199. Minimum Time to Build Blocks
Description
**Input:** blocks = [1], split = 1
**Output:** 1
**Explanation:** We use 1 worker to build 1 block in 1 time unit.**Input:** blocks = [1,2], split = 5
**Output:** 7
**Explanation:** We split the worker into 2 workers in 5 time units then assign each of them to a block so the cost is 5 + max(1, 2) = 7.**Input:** blocks = [1,2,3], split = 1
**Output:** 4
**Explanation:** Split 1 worker into 2, then assign the first worker to the last block and split the second worker into 2.
Then, use the two unassigned workers to build the first two blocks.
The cost is 1 + max(3, 1 + max(1, 2)) = 4.ac
Last updated