Consider the brute force implementation in which we find all the possible ways of multiplying the given set of n matrices. What is the time complexity of this implementation?
(a) O(n!)
(b) O(n^3)
(c) O(n^2)
(d) Exponential
This question was posed to me in unit test.
This interesting question is from Matrix-chain Multiplication topic in portion Dynamic Programming of Data Structures & Algorithms II