Taking the transpose (transfer) of the matrix means the displacement of the same numbered rows and columns of the matrix. The matrix obtained as a result of this process is the transpose (transfer) of ...
Given a 2D integer array matrix, return the transpose of matrix. The transpose of a matrix is the matrix flipped over its main diagonal, switching the matrix's row and column indices.