A transpose of a matrix is simply a flipped version of the original matrix.
We can transpose a matrix by switching its rows with its columns
Given a matrix, we have to find its transpose matrix.
Example:
Input:
matrix:
[2, 3, 4, 5, 6]
[7, 8, 9, 0, 9]
Output:
Transpose Matrix :
[2, 7]
[3, 8]
[4, 9]
[5, 0]
[6, 9]
Program to find transpose of a matrix in Kotlin
Output