Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Linked lists as arrays: inserting values

by Fletch (Chancellor)
on Sep 25, 2006 at 15:26 UTC ( #574749=note: print w/ replies, xml ) Need Help??


in reply to Linked lists as arrays: inserting values

splice can insert items in the middle, but yes that'll trigger the same inefficient copying and moving that your slice method incurs. If you're mucking with the middle of your list a lot then yes, you may have a case where a linked list will be more efficient than a native array.


Comment on Re: Linked lists as arrays: inserting values

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (16)
As of 2014-12-18 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (58 votes), past polls