DP problem (Top down vs bottom up)

Правка en4, от rr459595, 2019-06-26 17:32:10

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 (tabulating values from top left to bottom right)?

Thank you.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский rr459595 2019-06-26 17:32:10 50
en3 Английский rr459595 2019-06-26 17:29:32 31 Tiny change: 'oach works?\n' -> 'oach works and not top down?\n\nThank you.\n'
en2 Английский rr459595 2019-06-26 17:28:43 2
en1 Английский rr459595 2019-06-26 17:28:25 267 Initial revision (published)