As can be seen above, the first antidiagonal begins at the first row and first column (0, 0), and for the following positions, at first only the column coordinate is incremented, and only after reaching the last column (= 5 = n - 1) the row coordinate starts to be incremented instead.