Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Efficient Linked Lists

by dpuu (Chaplain)
on Jan 31, 2003 at 20:26 UTC ( #231705=note: print w/ replies, xml ) Need Help??


in reply to Efficient Linked Lists

I'm not sure that its more efficient, but you could try:

# create pairs my @tmp = map { $_, $_ } @filenames; # rotate push @tmp, shift @tmp; # create the result my %next = @tmp; my %prev = reverse @tmp;
In this code, the hashes form loops: to avoid that, replace the rotate step by code that remove the first and last elements. --Dave


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://231705]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-07-14 04:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (254 votes), past polls