Open In App

DP Problems Dimension Wise (1D, 2D and 3D)

Last Updated : 05 May, 2025
Summarize
Comments
Improve
Suggest changes
Share
Like Article
Like
Report

When we solve a Dynamic Programming (DP) problem, we store solution in an array. The dimensions of the array are dependent on number of variables that change in recursive (or optimal substructure) solution. If the recursive solution has only one dimension changing, then we call the problem as 1D DP because we need only dimensional array to store solutions of subproblems. Similarly, we define 2D and 3D DP. Below is classification of DP problems based on number of dimensions.

1D Dynamic Programming

2D Dynamic Programming

3D Dynamic Programming


Next Article
Article Tags :
Practice Tags :

Similar Reads