From: Randy Kramer Date: 2005-04-05T04:39:28+09:00 Subject: Re: doubly linked list in Ruby? On Monday 04 April 2005 03:09 pm, Tim Hunter wrote: > Ruby arrays are incredibly more flexible than C arrays. You can insert > an element into an array _between_ two other elements. > > a = [1,2,3] > a[1,0] = 4 => [1,4,2,3] > > You can delete an element from an array any number of ways. The > delete_at method works if you know the index of the element you want to > delete. But (just asking), what about performance? Is an entire new array created, or is the new stuff (only) put in a newly allocated piece of memory and a pointer/reference/whatever inserted into (maybe a linked list which implements) the array? Randy Kramer