Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2016-02-09 01:55 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (296 votes), past polls