in reply to Data structure challenge
Trouble is caused by initialisation, so what data structure to use that is initialized in constant time? The answer may be to use simple strings for A and B. The length should be U*log_10(U) so that each group of log_10(U) characters represents an "array element". Initialisation can be done using pack that should be constant time, array access can be simulated using substr which is also constant time.
Just my 2 cents, might be totally wrong, -gjb-
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Data structure challenge
by Abigail-II (Bishop) on Mar 17, 2004 at 20:58 UTC | |
by gjb (Vicar) on Mar 17, 2004 at 22:13 UTC | |
by Aristotle (Chancellor) on Mar 18, 2004 at 18:08 UTC |
In Section
Meditations