Given a matrix (dimensions= m X n)of Strings (“X” and “0”) where “X” represents students who are not interested in playing at all and “O” represents the students who are interested in chess. find the maximum possible number of chess games that can take place at the same time in the class.
We have to make pairs of adjacent chess player. Diagonal pairs are not considered.
eg 1:
3 3
O O O
O X X
X X X
ans = 2
eg2:
4 5
O O O O O
O O O O O
O X X O O
O O O O O
ans = 9
Eg: 3
2 3
X O X
O O O
ans=1
@sitihis