Coding

def cost(root, num_cores):
you have limition like only can run num_cores task same time, for example num_cores = 2
0-3 10
0-4 16
then
0-5 (0-3)10 + 10 = 20
5-1 25
then
5-6 (5-1) 25 + 2 = 27
6-10 29
how to coding ?
Comments (1)
Coding

def cost(root, num_cores):
0-3 10
0-4 16
then
0-5 (0-3)10 + 10 = 20
5-1 25
then
5-6 (5-1) 25 + 2 = 27
6-10 29
how to coding ?