[x] Do you have Node.js and all the relevant dev-dependencies installed?
[ ] Is this a bug fix?
[x] Is this an enhancement?
[x] Is this a feature request?
NOTE: Provide a clear and concise description of the feature that needs to be added! Or if its a bug, then provide the necessary steps to reproduce it along with screenshots.
Give your answer below:
To find the least number of operations needed to multiply a chain of matrices together. For example, given 4 matrices A, B, C, D, there can be multiple ways of multiplying them, such as:
(ABC)D = (AB)(CD) = A(BCD) ...
Validation: Input taken should be an array of positive integers, otherwise it should throw an error.
Input: An array with number of rows of the respective matrices.
Output: Minimum number of operations.
M.matrixChain([40, 20, 30, 10]) //14000
//Validations
M.matrixChain(12) //Error: not an array
M.matrixChain(10, -20, 40, 10) //Error: not positive integers
Do the checklist before filing the issue:
NOTE: Provide a clear and concise description of the feature that needs to be added! Or if its a bug, then provide the necessary steps to reproduce it along with screenshots.
To find the least number of operations needed to multiply a chain of matrices together. For example, given 4 matrices A, B, C, D, there can be multiple ways of multiplying them, such as:
(ABC)D = (AB)(CD) = A(BCD) ...
Validation: Input taken should be an array of positive integers, otherwise it should throw an error.
Input: An array with number of rows of the respective matrices.
Output: Minimum number of operations.