an indexed list - how to do it in python

Courageous jkraska1 at san.rr.com
Sat Aug 12 14:06:10 EDT 2000


dmost at magna.com.au wrote:
> 
> I want to create, in Python, an object that mixes...

Get Sedgewick's _Algorithms in C_. What you want is
called a "Red Black Tree," probably the most efficient
algorithm for implementing key-search and ordered
traversal.

You might also look around on the net for implementations,
or you can go to The Vaults of Parnassus and find some
balanced tree implementation. I didn't notice any red-black
trees, but Python's function calling overhead will probably
mask any performance advantages that any specific tree
implementation has anyway.



C//



More information about the Python-list mailing list