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



standard 2d array filling with increasing numbers for rows and columns:

for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
a[i][j] = i + j;

problem is it's O(n^2). I'm looking for a method to decrease the time,
any suggestions? I'm googling for dynamic programming solutions, but
not coming up with much.

.



Relevant Pages

  • Re: Filling 2d array in less than O(n^2)?
    ... With respect to assignment, obviously. ... >>standard 2d array filling with increasing numbers for rows and columns: ... Prev by Date: ...
    (comp.theory)
  • Re: Nilgewater about void main()
    ... that does it increas or decrease the number of errors? ... 1999 standard, removed the spurious claim that you could use "void main". ... the user's expectations, violates anything. ... All C99 did was strongly hint that, if you were accepting other ...
    (comp.lang.c)
  • Re: Standard Cell Vs FPGA designs
    ... you believe the number of new designs per year executed in standard ... cells will increase ... or decrease in the future as compared with a baseline of 2007? ...
    (sci.electronics.design)
  • Re: Standard Cell Vs FPGA designs
    ... you believe the number of new designs per year executed in standard ... cells will increase ... or decrease in the future as compared with a baseline of 2007? ...
    (sci.electronics.design)
  • Re: Standard Cell Vs FPGA designs
    ... you believe the number of new designs per year executed in standard ... cells will increase ... or decrease in the future as compared with a baseline of 2007? ...
    (sci.electronics.design)