Count Unguarded Cells in the Grid
Sweep out from every guard in four directions until a wall or another guard, marking the cells it sees as guarded.
Sweep out from every guard in four directions until a wall or another guard, marking the cells it sees as guarded.