for (k = i; k < j; k++)
{
count = MatrixChainOrder(p, i, k) +
MatrixChainOrder(p, k + 1, j) +
p[i - 1] * p[k] * p[j];
if (count < min)
min = count;
}
// Return minimum count
return min;
}
for (k = i; k < j; k++)
{
count = MatrixChainOrder(p, i, k) +
MatrixChainOrder(p, k + 1, j) +
p[i - 1] * p[k] * p[j];
if (count < min)
min = count;
}
// Return minimum count
return min;
}
@rohitkandpal683
Can you please tell me the timestamp in the video lecture where this problem arise.
i cannot uderstand from this vedio so i watch prateek bhaiya you tube vedio on matrix chain multiplication at 19.14 there is a loop k from i to j from there onwards i cannot understand how this loop and partition works https://www.youtube.com/watch?v=D1U74eFLg_g