hello everyone! i am a newbie and trying to learn dynamic programming , i find it easy to write a recursive solution but it i find it difficult to memoize it. or you can say , that i am unable to judge on what factors dp state depends . any help would be appreciated . :)
If you are confused with choosing such "factors", then you didn't fully understood dynamic programming since you are simply writing brute force search.
I recommend you to read the response of Mimino in Quora here.
In special this part:
"Here are some restrictions I put on a backtrack solution:
I don't see how DP/memoisation relates to backtracking. They're two different techniques. Why did you highlight that?