Maze Cleaning

Now that we have the volume of the maze, we need to pump water through the maze to clean it.

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}}



To solve this puzzle, use this link to get the large input set.
The large input set is a 27 x 27 grid.
{{response}}

Related challenges:
Maze Cleaning 💤 Power-up Maze