Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

copycat69's blog

By copycat69, history, 7 hours ago, In English

I'm learning DP . Most of the code I've seen so far uses iterative DP. Is there anyone who uses Recursive DP?????

  • Vote: I like it
  • +4
  • Vote: I do not like it

»
6 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Recursive dp usually has a lot of overhead time and memory-wise since recursion requires a call stack in memory and sometimes that exceeds the time or memory limit.

»
6 hours ago, # |
  Vote: I like it +1 Vote: I do not like it

I use recursive DP when I am unsure in order of computing(or a lot of parameters). If it TLs then I rewrite it on iterative(if it is possible).