My array is of type [[Int]]
array = [[1,2,3],
[4,5,6],
[7,8,9,10],
[11,12,13],
[14,15,16]]
I want the transpose result as:
array = [[1,4,7,11,14],
[2,5,8,12,15],
[3,6,9,13,16],
[0,0,10,0,0]]
How to pad 0's to an array which does not have an equal row or column mapping.
I want the transpose to work for both rows and columns with unequal mapping elements. Please help.