Data structures for tree traversals?

Carl phleum_nospam at
Sun Nov 14 12:58:02 CET 2004

Dear friends,

What are the best options for implementing fast and efficient trees in

The typical trees that I'm thinking of are those used by the finance
industry to price different kinds of derivatives (ie forward simulation of
prices/rates in binominal/trinominal trees and backward induction to price
final claims). 

Intuitively, dictionaries seem to be ideal candidates for accessing objects
at nodes and traversing the tree. Am I right or are there better choices?
Are lists better? Has Numerical Python speed-efficient methods that are to
be preferred in comparison with lists ad dictionaries?


More information about the Python-list mailing list