Dynamic Programming

Dynamic Programing

Dynamic Programming is a technique to write efficient code so that in recursive calls the repetitive work should be avoided.

Dynamic Programming (DP) can be described as storing answers to various sub-problems to use later whenever repetation of work happened so that code should not do the same work and lag in time and space.

Dynamic Programming Approaches

Commonly two types of Dynamic Programming Approaches are used.

  1. Top-Down Approach→ Memorization Technique
  2. Bottom-Up Approach→ Tabulation Technique