approach's blog

By approach, history, 3 years ago, In English

Problem Link so, I was able to come up with memoization approach, but unable to write iterative version.

The correct one happens to be

Correct implementation

But I failed to realise, why this one is wrong.

wrong one

could u help me out please, any kind of help on how to approach such iterative DP problems, will be appreciated.

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?