Important Points

  1. dp[i][j] = dp[i][j] < 0 ? dp[i][j] + 1000000007 : dp[i][j] % 1000000007
  2. In MCM make dp table of size NXN where N = no. of matrices + 1

1D Array DP

Knapsack

Longest Increasing Subsequence

Longest Common Subsequence

MCM Variants

DP on Strings

DP on Trees

DP on Matrices

Miscelleneous