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. [10]
Answers
Answered by
0
Answer:
Sample Run:
Input:
. . . X
X . . X
. X X X
. . . .
Output:
Safe indices are:
0,1
3,0
Explanation:
Similar questions
English,
14 hours ago
Math,
14 hours ago
India Languages,
14 hours ago
Science,
1 day ago
History,
1 day ago