I need help with transposing a matrix.

I already did the transpose matrix using 2 arrays.

But I can't figure out how to do it using only one array.

So read a matrix and create the transpose within itself.

Do I use the swap or what?

Any help would be great.

Later