Bst

would you like to take a look at our updated version using dictionary as
the placeholder =) ???

https://github.com/corinnelhh/data-structures/blob/debug/BST/duy_bst.py


On Wed, Jul 16, 2014 at 3:33 PM, Naomi T. S. <notifications@github.com>
wrote:

> In BST/bst.py:
>
> > +    def _find_node(self, val):
> > +        tmp = self._root
> > +        tmp_parent = None
> > +        while True:
> > +            if val < tmp._data:
> > +                tmp_parent = tmp
> > +                tmp = tmp._left
> > +            elif val > tmp._data:
> > +                tmp_parent = tmp
> > +                tmp = tmp._right
> > +            else:
> > +                return tmp, tmp_parent
> > +            if tmp is None:
> > +                raise IndexError
> > +
> > +    def delete_node(self, val):
>
> This method is just a tad too complex, and also should be called delete(),
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/corinnelhh/data-structures/pull/21/files#r15032294>.
>