DP Table Method

Let's talk about algorithms!

Moderator: Board moderators

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

DP Table Method

Post by cyberdragon » Tue Sep 17, 2013 12:04 am

I can't understand DP table Method especially with it's memory saving tricks.
Need help with references or anything explains it well.

Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: DP Table Method

Post by brianfry713 » Tue Sep 17, 2013 9:57 pm

Check input and AC output for thousands of problems on uDebug!

New poster
Posts: 11
Joined: Fri Nov 08, 2013 11:04 pm

Re: DP Table Method

Post by matheusdallrosa » Sun Sep 07, 2014 9:43 pm

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”