Given a square maze (A) of dimension N, every entry (Aij) in the maze is either an open cell 'O' or a wall 'X'. A rat can travel to its adjacent locations (left, right, top and bottom), but to reach a cell, it must be open. Given the locations of R rats, can you find out whether all the rats can reach others or not.
Input Format:
Input will consist of three parts, viz.
1. Size of the maze (N)
2. The maze itself (A = N * N)
3. Number of rats (R)
4. Location of R rats (Xi, Yi)

Going back to school after summer vacation is not the easiest thing to do. In fact, it takes more mental…

APPROVED BY CLIENTS

It's hard to get straightforward feedback for programming assignments, usually it's like pulling teeth when you just want to flat out see where you went wrong so you can improve. Worth the (reasonable) payment. 5/5

## Comments

## Leave a comment