1.

Q3. Given a 4 x 4 matrix representing a chessboard where ‘X’ indicates the presence of a pawn which can move one step in the direction [up, down, left, right] print out the indices where it is safe to place your pawn so that it is not in the range of the other pawns. Please write a program which works for all arrangements and not necessarily this one. [5] Sample Run: Input:. . . XX . . X. X X X . . . .Output:Safe indices are: 0,1 3,0​

Answer» SAMPLE RUN: INPUT:. . . XX . . X. X X X . . . .Output:SAFE indices are: 0,1 3,0


Discussion

No Comment Found