0

take a not nested array in as input. turn it into a matrix by:
let's say my array is [1, 2, 3, 4, 5]
first, i repeat that array 5 times: (the length)
[[1, 2, 3, 4, 5],
[1, 2, 3, 4, 5],
[1, 2, 3, 4, 5],
[1, 2, 3, 4, 5],
[1, 2, 3, 4, 5]]
then, i read it along the diagonals:
[[1],
[2, 1],...