Find the minimum initial health to cross a dungeon grid without going negative.
Unlock detailed company stats for this questionUpgrade
Dungeon game: a grid where each cell holds the health points a person gains when entering it. Output the minimum health required at the start so that health never goes negative while travelling from (0,0) to (n-1,n-1). I solved it with BFS plus binary search.
Community answers
No answers contributed by the community yet.
Related questions
Find the minimum initial health a knight needs to travel from the top-left to the bottom-right of a grid.Find the minimum steps to reach the destination in a grid with jumps.Find the minimum walls needed to contain a spreading infection in a grid.Related courses

Course

Course
Course
