Complete the algorithm


We consider the following sub-problem:opt takes two inputs i and the name M of the machine (either A or B) and returns the value of an optimal plan. Complete the algorithm.

def switch(a, b):
## assume a and b are 1-indexed and n = # min
opt[1, "A"] =
opt[1, "B"] =
for i in range( , ):
opt[ , "A"] =
opt[ , "B"] =
return max(opt[ , ], opt[ , ])

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Complete the algorithm
Reference No:- TGS0117574

Expected delivery within 24 Hours