Filling 2d array in less than O(n^2)?
- From: pjhyett@xxxxxxxxx
- Date: 18 Nov 2005 13:22:56 -0800
standard 2d array filling with increasing numbers for rows and columns:
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.