Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Create a 2D array to represent the grid. Can you mark the tiles that can be seen by a guard?
Iterate over the guards, and for each of the 4 directions, advance the current tile and mark the tile. When should you stop advancing?