ed_davis2 wrote: > I've gone through a Ruby tutorial, and have been writing some > simple programs. > > But I have a question: how would I implement a simple doubly > linked list of strings in Ruby? I have some data that I need to > access as if it were an array, but I also need to insert/delete > items frequently. If I was using C, I'd just create a doubly > linked list. But I don't have a good idea of how to create one > in Ruby. > 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.