DP problem (Top down vs bottom up)

Revision en3, by rr459595, 2019-06-26 17:29:32

I tried solving this problem on leetcode ( https://leetcode.com/problems/dungeon-game/ ). I got AC with bottom up approach but wrong answer with top down approach.

Can someone help me in proving why only bottom up approach works and not top down?

Thank you.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English rr459595 2019-06-26 17:32:10 50
en3 English rr459595 2019-06-26 17:29:32 31 Tiny change: 'oach works?\n' -> 'oach works and not top down?\n\nThank you.\n'
en2 English rr459595 2019-06-26 17:28:43 2
en1 English rr459595 2019-06-26 17:28:25 267 Initial revision (published)