vanekl <vanek@acd.net> wrote:
+---------------
| I guess I should have been explicit by saying that
| the data structure has to expand and contract from both
| ends, and by the time the algorithm has finished running
| the data structure is discarded.
+---------------
I think you want this:
http://en.wikipedia.org/wiki/Linked_list#Doubly-linked_list
or maybe this:
http://en.wikipedia.org/wiki/Linked_list#Doubly-circularly-linked_list
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607