I once had a beautiful rectangular array. It was very symmetrical, but unfortunately it has fallen apart and now I only have the top left corner. Your task will be to rebuild the original array.
Your program will receive a 2 dimensional array of integers. For ease of parsing, you may assume they are all between 1 and 9. Your task is to reverse the array's columns, its rows, and both, stitch together the resulting corners, and return the resulting array.
You can assume the array dimensions will be at least 1x1.
Test cases:
Input:
1 2 3
4 5 6
Output:
1 2 3 3 2 1
4 5 6 6 5 4
4 5 6 6 5 4
1 2 3 3 2 1
Input:
1
Output:
1 1
1 1
Input:
9
9
9
Output:
9 9
9 9
9 9
9 9
9 9
9 9
This is code-golf, fewest bytes wins!
WS⟦ι⟧‖M→↓
perhaps? 5 bytes to read the input and 4 to reflect it. \$\endgroup\$╬
(or some similar character) just can't remember which one :c \$\endgroup\$