Aditya_Ramesh
Joined 8 years ago
Karma
240
Submissions
29
Member since
Jun 16
Joined 8 years ago
And thanks for the nice words!
And in regards to the "global variable", my variable 'dp' is my cache array. It's where I'm storing my precomputed results.
If I don't modify it, it's not DP anymore, it's plain recursion. :)
I guess I should've mentioned that the actual memoization table is an exception.
Anyway, thanks for reading my article! :)
I'm starting with classical problems and I'll soon diverge into non-classical problems, as I've mentioned in my article too.
In any case, hope my other articles on my blog added more value to you in comparison!