Re: Filling 2d array in less than O(n^2)?
- From: jeffrey_h_miller@xxxxxxxxx
- Date: 22 Nov 2005 09:39:15 -0800
Forget about writing the array. When you need to read element
a[i][j], substitute the value i+j. Then "filling" is an O(1) operation.
.
- Follow-Ups:
- Re: Filling 2d array in less than O(n^2)?
- From: Dimitri Ognibene
- Re: Filling 2d array in less than O(n^2)?
- References:
- Filling 2d array in less than O(n^2)?
- From: pjhyett
- Filling 2d array in less than O(n^2)?
- Prev by Date: Re: Can someone give me an example of this type of problem?
- Next by Date: Re: rb-tree creation from sorted sequence
- Previous by thread: Re: Filling 2d array in less than O(n^2)?
- Next by thread: Re: Filling 2d array in less than O(n^2)?
- Index(es):