Linked Lists and Trees
Aahz Maruch
aahz at panix.com
Mon Oct 16 12:28:05 EDT 2000
In article <8sb6f9$rgj$1 at news.nuri.net>,
June Kim <junaftnoon at nospamplzyahoo.com> wrote:
>
>Can you refer me to,
>"Any good and robust (in terms of memory management and speed)
>implementation of general data structures like double-linked lists and
>trees"?
Although there are other ways, I usually just use a Python class to
simulate a C record (with prev/next for lists and right/left for trees).
That makes it easy to swipe algorithms. Note that you'll need to be as
careful as in C to free memory structures or you'll leak memory.
--
--- Aahz (Copyright 2000 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
"Isn't it interesting that the same people who laugh at science fiction
listen to weather forecasts and economists?" -- Kelvin Throop III
More information about the Python-list
mailing list