Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 174. Dungeon Game
Given a grid of integers (positive heal, negative damage) and moves only right or down, find the minimum positive initial health so the running health never drops to zero or below when reaching the bottom-right. This is solved by reverse dynamic programming computing, for each cell, the minimum health required on entry (at least 1) based on the requirements of its right and down neighbors.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.