Doubt in memoization and dp

how memoization and dp are approach are different unable to get it please explain

Hi @Divya_321
A dp problem can be solved in 2 ways.

  1. Tabulation (Bottom Up)
    If we start our transition from our base state i.e dp[0] and follow our state transition relation to reach our destination state dp[n], we call it Bottom Up approach

  2. Memoization Top down)
    If we need to find the value for some state say dp[n] and instead of starting from the base state that i.e dp[0] we ask our answer from the states that can reach the destination state dp[n] following the state transition relation, then it is the top-down fashion of DP.

For detail explaination with code refer this:

Hope it helps
Mark resolved if satisfied :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.