MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / main

Function main

dynamic_programming/matrix_chain_order.py:36–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 print(")",end = " ")
35
36def main():
37 array=[30,35,15,5,10,20,25]
38 n=len(array)
39 #Size of matrix created from above array will be
40 # 30*35 35*15 15*5 5*10 10*20 20*25
41 Matrix , OptimalSolution = MatrixChainOrder(array)
42
43 print("No. of Operation required: "+str((Matrix[1][n-1])))
44 PrintOptimalSolution(OptimalSolution,1,n-1)
45if __name__ == '__main__':
46 main()

Callers 1

Calls 2

MatrixChainOrderFunction · 0.85
PrintOptimalSolutionFunction · 0.85

Tested by

no test coverage detected