Acedbysomeone's blog

By Acedbysomeone, history, 9 years ago, In English

I don't understand why in some dp problems dp[0] is equal to 0,like the coin change problem.Can someone explain this to me?

Tags dp
  • Vote: I like it
  • -18
  • Vote: I do not like it

| Write comment?
»
9 years ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

It depends on what your table actually represents.

»
9 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

afaik, in the coin change problem dp[0] = 1, so what do you mean?