Top down approach in dynamic programming

Revision en1, by vaibhavvasant1705, 2017-03-29 13:41:33

https://www.hackerrank.com/contests/codeagon/challenges/elemental-orbs

How to solve this question using top down approach? I am able to memoize it using three variables which is leading to time limit exceeded. I understood the bottom up approach but i am not able to write top down for this. Kindly help

Tags dynamic programming

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English vaibhavvasant1705 2017-03-29 13:41:33 348 Initial revision (published)