The purpose of this exercise is to train you to work with arrays.
Estimated workload of this exercise is 45 min.
Please, proceed to TransposeMatrix
class an implement its method multiply
.
It takes a rectangular integer array (matrix) as a parameter and returns it transposed.
Consider an integer matrix represented as a rectangular array. The task is to transpose a given matrix over its main diagonal. The transposition of a matrix over its main diagonal is simply a flipped version of the original matrix.
Hint: Transpose Reference
Input:
{
{0, 1, 2},
{3, 4, 5},
{6, 7, 8}
}
Output:
{
{0, 3, 6},
{1, 4, 7},
{2, 5, 8}
}