Shortest Path in a Changing Maze
Stable Maze
Example
Mutable Maze with One Bomb
Now you are given a bomb that you can knock down a wall. What is the minimum number of steps now?
Example
Mutable Maze with K Bombs
Now you are give k bombs. What is the minimum number of steps?
Example
Because this is a minimization problem and we are only storing a number we can try DP. And there is indeed an optimal substructure and overlapping subproblems (each layer).
Last updated