Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Efficient Linked Lists

by YuckFoo (Abbot)
on Jan 31, 2003 at 20:50 UTC ( #231718=note: print w/ replies, xml ) Need Help??


in reply to Efficient Linked Lists

Go ahead, link the whole list, then delete the previous entry of the first and the next entry of the last.

LinkFoo

for my $fileindex (0..$#filenames) { $next{$filenames[$fileindex]} = $filenames[$fileindex + 1]; $prev{$filenames[$fileindex]} = $filenames[$fileindex - 1]; } delete($prev{$filenames[0]}); delete($next{$filenames[-1]});


Comment on Re: Efficient Linked Lists
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-12-22 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (110 votes), past polls