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?
DP problem (Top down vs bottom up)
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?