6 kyu
Matrix Transpose
69 of 7,919osuushi
Description:
Write a function that outputs the transpose of a matrix - a new matrix where the columns and rows of the original are swapped.
For example, the transpose of:
| 1 2 3 |
| 4 5 6 |
is
| 1 4 |
| 2 5 |
| 3 6 |
The input to your function will be an array of matrix rows. You can assume that each row has the same length, and that the height and width of the matrix are both positive.
Mathematics
Algebra
Matrix
Algorithms
Similar Kata:
Stats:
Created | Feb 12, 2014 |
Published | Feb 12, 2014 |
Warriors Trained | 11967 |
Total Skips | 243 |
Total Code Submissions | 19396 |
Total Times Completed | 7919 |
CoffeeScript Completions | 69 |
JavaScript Completions | 4331 |
Python Completions | 2743 |
Ruby Completions | 159 |
C Completions | 434 |
Groovy Completions | 34 |
Go Completions | 158 |
λ Calculus Completions | 11 |
Rust Completions | 131 |
OCaml Completions | 35 |
D Completions | 5 |
Scala Completions | 29 |
Crystal Completions | 8 |
Lua Completions | 11 |
Haskell Completions | 11 |
Total Stars | 177 |
% of votes with a positive feedback rating | 92% of 752 |
Total "Very Satisfied" Votes | 655 |
Total "Somewhat Satisfied" Votes | 80 |
Total "Not Satisfied" Votes | 17 |