I need to be able to mirror a multidimensional array that changes in size. I’m currently hard coding for each particular array size and it is horribly inefficient.
Example:
Arr1 { 1 2 3 Arr2 { 1 2
4 5 6 3 4
7 8 9 } 5 6 }
Mirrored:
{ 3 2 1 { 2 1
6 5 4 4 3
9 8 7 } 6 5 }
Arrays range in size from 2×5 to 4×10.
Ok, so all you need is a horizontal mirror.
I suppose that your array contains an array for every line,
so that means that you just need to reverse every row.
or even better