Your solution has been submitted!

(You can close this window)

Coding tests are not compatible on small screen devices like mobiles, please switch to a Desktop or Laptop.
You have 10 minutes to solve this problem.

This session will automatically time-out after 5 minutes and can no longer be accessed, start immediately.

Problem: Matrix Transposition
Language: java
Description:

Transpose the given matrix.

Instructions:

Input
The first line of input contains two numbers m and n (1 ≤ m, n ≤ 200) corresponding to the number of rows and the number columns of the matrix respectively. It is then followed by m rows with n numbers in each column. Output
The output should contain a transposed matrix.

Example Input:
4 3
1 2 5
4 3 3
3 4 9
8 7 7
Output:
1 4 3 8
2 3 4 7
5 3 9 7

// You can start typing your code here