Re: Filling 2d array in less than O(n^2)?



That's what I'm thinking about

If you look at the output for 4x4 it looks like

0 1 2 3
1 2 3 4
2 3 4 5
3 4 5 6

and I'm thinking there's a way to take advantage of the fact that some
numbers are repeated.

.