sir I do not understand the recursive recurrence
why is there 3 parameters??
we break the problem around some point so we need to return the result of multiplication only !!
Mixtures(spoj) DP
hello @mzk1994
there are two parameters that are there to indicate the start and end of the array.
and becuase we dont know at which point we should break our problem to get the minimum answer, we are trying to break at every possible index and then considering only that which has minimum result.
that is why we have this recurrence
solve(i,j) -> min of [ solve(i,k) + solve(k+1,j) + product] where k = i to j-1
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.