From: James Edward Gray II Date: 2005-04-05T04:01:24+09:00 Subject: Re: doubly linked list in Ruby? On Apr 4, 2005, at 1:39 PM, 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. Because Array supports push, pop, shift, unshift and splice, we tend to just use Arrays for this kind of thing. Can you give us an example of what you're trying to do? James Edward Gray II