1213 — Sum of Different Primes, Help !!

Правка en1, от approach, 2021-10-01 11:22:35

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.

Теги need help, uva, dp problem, iterative dp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский approach 2021-10-01 11:34:00 7
en1 Английский approach 2021-10-01 11:22:35 1190 Initial revision (published)