Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Advanced Data Structure Question

by dokkeldepper (Friar)
on Apr 19, 2006 at 15:21 UTC ( [id://544385]=note: print w/replies, xml ) Need Help??


in reply to Advanced Data Structure Question

Hi,

use an array to keep the values, create a B-Tree to do the search. However instead of the values keey in the tree-nodes the index of the array elements you search for.

The hardest thing here is to keep the array in sync with the tree.

Basically it is something like an indexed array.

update: Uaaa, I missed the line with "never more than 1000 elements". Then my proposal is a total overkill. Isn't there a chapter in PBP about benchmarking?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://544385]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-26 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found