DP Table Method

Let's talk about algorithms!

Moderator: Board moderators

Post Reply
cyberdragon
New poster
Posts: 20
Joined: Fri Aug 30, 2013 5:42 am

DP Table Method

Post by cyberdragon »

I can't understand DP table Method especially with it's memory saving tricks.
Need help with references or anything explains it well.
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: DP Table Method

Post by brianfry713 »

Check input and AC output for thousands of problems on uDebug!
matheusdallrosa
New poster
Posts: 11
Joined: Fri Nov 08, 2013 11:04 pm

Re: DP Table Method

Post by matheusdallrosa »

i had the same problem, but if you see when we close the recurrence formula, we know where to get the things on the table by the parameters of the function on the formula, example:

http://www.geeksforgeeks.org/dynamic-pr ... -distance/

on this formula we need to take the states that are stored on M[ i-1 ][ j ] , M[ i ][ j-1 ] , M[ i-1 ][ j-1 ].

See the knapsack example that you're gonna take it.
Post Reply

Return to “Algorithms”