[Python-de] binaerer Baum in Python

Dinu Gherman gherman at darwin.in-berlin.de
Fri Oct 26 15:49:51 EDT 2001


Juergen Hermann <jh at web.de>:

> class BinTreeNode:
> 	def __init__(self, data):
> 		self.left = None
> 		self.right = None
> 		self.data = data
> 
> class BinTreeNode:
> 
> 	def __init__(self, data):
> 		self.root = None
> 
> 	def insert(self, data):
> 		if not self.root:
> 			self.root = BinTreeNode(data)
> 		else:
> 			...
> 
> usw.


Oder auch "nature", d.h. "pyrement": ;-)

  http://www.python.org/doc/essays/graphs.html

Dinu



More information about the Python-de mailing list