Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Matrix Chain Multiplication

Medium Interval DP

Given the dimensions of a chain of matrices, where matrix i has size dims[i-1] x dims[i], print the minimum number of scalar multiplications needed to multiply the whole chain.

Constraints

3 <= n <= 100 1 <= dims[i] <= 500

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.