|
|
| The stupid question is the question not asked | |
| PerlMonks |
Re: Data structure challengeby gjb (Vicar) |
| on Mar 17, 2004 at 13:11 UTC ( [id://337447]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
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-
In Section
Meditations
|
|
||||||||||||||||||||||||||||||||