A skew symmetric matrix M satisfies MT = -M, where MT denotes the transpose of the matrix M and -M denotes the matrix obtained by multiplying each entry of M by -1. The transpose of a matrix M is obtained by replacing the element in the i'th row and j'th column of M with the element in the j'th row and i'th column of M. Note that this requires the diagonal elements of a skew-symmetric matrix to be equal to 0.
Create a class SkewSymmetric which contains a method minChanges. The method will take a String[] M, each element of which is a single space separated list of integers. The j'th number in the i'th element of M represents the value at row i and column j of the matrix. The method should return the minimum number of values in M that must be changed such that the resulting matrix is skew symmetric. |