Dynamic programming(DP) has been a nightmare for most of us. The fact is more you avoid DP problems, the tougher it will get. I have attempted to explain DP using a standard DP problem “Longest Common Subsequence” which will help you get started with solving DP questions.
Dynamic programming is a technique to solve optimization problems[problems where you have to minimize or maximize]. It is used to save computation time at the expense of some space, by storing the solution to overlapping subproblems(explained below) and using them wherever they appear instead of recalculating.
Pre-final year computer science student with keen interest in full stack development and problem solving.