6 kyu

Transpose of a Matrix

611 of 868debri

Description:

Transpose means is to interchange rows and columns of a two-dimensional array matrix.

[AT]ij=[A]ji

ie: Formally, the i th row, j th column element of AT is the j th row, i th column element of A:

Example :

[[1,2,3],[4,5,6]].transpose() //should return [[1,4],[2,5],[3,6]]

Write a prototype transpose to array in JS or add a .transpose method in Ruby or create a transpose function in Python so that any matrix of order ixj 2-D array returns transposed Matrix of jxi .

Link: To understand array prototype

Linear Algebra
Matrix
Data Structures
Mathematics
Arrays
Fundamentals

Similar Kata:

More By Author:

Check out these other kata created by debri

Stats:

CreatedJul 3, 2015
PublishedJul 3, 2015
Warriors Trained1924
Total Skips268
Total Code Submissions7320
Total Times Completed868
JavaScript Completions242
Ruby Completions50
Python Completions611
Total Stars45
% of votes with a positive feedback rating85% of 229
Total "Very Satisfied" Votes176
Total "Somewhat Satisfied" Votes38
Total "Not Satisfied" Votes15
Total Rank Assessments48
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • debri Avatar
  • GiacomoSorbi Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • cliffstamp Avatar
  • WestwardLand968 Avatar
Ad