Size of matrix created from array [30, 35, 15, 5, 10, 20, 25] will be: 30*35 35*15 15*5 5*10 10*20 20*25
()
| 49 | |
| 50 | |
| 51 | def main(): |
| 52 | """ |
| 53 | Size of matrix created from array [30, 35, 15, 5, 10, 20, 25] will be: |
| 54 | 30*35 35*15 15*5 5*10 10*20 20*25 |
| 55 | """ |
| 56 | |
| 57 | array = [30, 35, 15, 5, 10, 20, 25] |
| 58 | n = len(array) |
| 59 | |
| 60 | matrix, optimal_solution = matrix_chain_order(array) |
| 61 | |
| 62 | print("No. of Operation required: " + str(matrix[1][n - 1])) |
| 63 | print_optimal_solution(optimal_solution, 1, n - 1) |
| 64 | |
| 65 | |
| 66 | if __name__ == "__main__": |
no test coverage detected