News for hackers. Stuff that matters.
Re:Dynamic Programming for Technical Interviews by Aditya_Ramesh on Friday March 15, 2019 @10:43AM (#19400127)
Thanks for pointing out the typo! I'll fix that right away.

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! :)

Re:Dynamic Programming for Technical Interviews by zerocool2750 on Friday March 15, 2019 @10:58AM (#19400258)
Totally makes sense I just think it's slightly confusing in that context. Anyway, awesome article I enjoyed the read!
Re:Dynamic Programming for Technical Interviews by Aditya_Ramesh on Friday March 15, 2019 @12:40PM (#19401362)
Thank you! I'll make sure to go over some non-classical problems in my next article on DP to add more value :)