Dynamic Programming, Facebook Coding Interview, Google Coding Interview, Coding Interviews, Java.
to total dp[i][j] = min(1+dp[i][j - coins[i]], dp[i-1][j]) if j >= coins[i] dp[i-1][j] otherwise Matrix chain multiplication Input array arr[] representing size of matrix {rows, cols} Dp state dp[i][j] represents minimum cost of multiplying matrices from index i to j // Another example of