Re: Subsequent storage
Robert McDougal writes:
> Robert suggested using a temporary variable with this
> problem. So if I set t=x[i] append something to t, and set x[i]=t
> then that would take less time? I'm more confused now about this
> then ever. If so, then I don't understand why that is. Wouldn't
> you still be dealing with the N-squared thing when you set x[i]=t?
> More confused now then ever,
I meant that something like:
t = x[i]
for i = 1 to 10000 do
t = append(t, v)
end for
x[i] = t
will be much faster than appending to x[i] inside the loop.
Regards,
Rob Craig
Rapid Deployment Software
http://members.aol.com/FilesEu/
|
Not Categorized, Please Help
|
|