whenever we have to calculate result for same input again and again, we cache the result so that we can use it later.

learn more about it here and also here

there are two types of Dynamic Programming approach

- Memoization (top-down)
- Tabulation (bottom-up)

Tabulation

use a Two-dimensional arrays (2D arrays) to store data in a table, where the elements are arranged into rows and columns. Each cell in the table contains solutions to all of the sub-problems that make up a larger problem. This is commonly referred to as a bottom-up approach.