Challenging us on the last day of class with the ultimate question, my professor gave us this problem.
It's nearing midnight (11:55), and I've completely given up hope.
This is the problem:
Reverse the diagonals of a square 2-D array for any size square array.
For example,
9 8 7
6 5 4
3 2 1
would become:
1 8 3
6 5 4
7 2 9
Likewise, the array
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
would become:
12 2 3 14
5 11 10 8
9 7 16 12
4 14 15 1
Exactly what sort of C++ wonder would I have to use to solve this problem?
Just any hint would be helpful and much appreciated (: