Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why recursive data structures?.
for (x = 0; x < N; x ++) { for (y = 0; y < N; y ++) { newSquare[x][y] = oldSquare[y][N-1-x]; } }
Of course, in certain representations of the square (such as using a 1-d array) even simpler algorithms can be used.
There are no comments on this comment yet.
for (x = 0; x < N; x ++) { for (y = 0; y < N; y ++) { newSquare[x][y] = oldSquare[y][N-1-x]; } }
Of course, in certain representations of the square (such as using a 1-d array) even simpler algorithms can be used.