3D DP question

please help me to understand 3D dynamic programming like some basic question of it with explanation, link is also fine
thank you

I had did my first dp question on codeforces which uses 3D array.
Here is the link : http://codeforces.com/problemset/problem/711/C
In this I had used a 3D dp array for memoization. In my solution dp[i][j][k] will represent the number of the minimum amount of paint needed to colour the first i trees such that it has beauty j and the i-th tree is colored by colour k.
U can see the editorial for more details which is in the name of “Tutorial” on the bottom right corner.
Happy coding :wink:

1 Like

thank you.

This 3d dp problem is really nice and it will surely provide you the clarity

yes its 3d dp

if one give some question from geeksforgeeks ,or some other platform?