A maze, represented by a 2D grid, is given. A # represents a wall, and a . represents an empty tile.
Water must be pumped into the grid in order to clean it. It starts at the tile marked A.
Each second, the water flows one tile up, down, left, and right. Water is blocked by walls.
Determine how much time the water will take to completely fill the grid.
Here is an example, along with an explanation. Press the buttons to go forward or backward a move.
{{currentMaze}}
{{currentExplanation}}
Current second: {{index}}