This took a moment
I spent a lot of time stupidly thinking about right/left sorting, is it
looping? no that's not it...doh Then the light
then realized this
if self.key == key:
return 1
elif key < self.key:
if self.left:
self.left.find(key
[EMAIL PROTECTED] a écrit :
> Hi all,
>
> I am running into a conceptual glitch in implementing a simple binary tree
> class. My insertion and printing (sorting) seems to be ok, but when I search
> the tree, my find method isn't doing what I thought it should.
>
> Here is the output of running
Hi all,
I am running into a conceptual glitch in implementing a simple binary tree
class. My insertion and printing (sorting) seems to be ok, but when I search
the tree, my find method isn't doing what I thought it should.
Here is the output of running my tests:
>python -i trees.py
***