py-bst icon indicating copy to clipboard operation
py-bst copied to clipboard

Bug in _delete_leaf_parent in AVLTree

Open leor-c opened this issue 6 years ago • 0 comments

When deleting the root (node.key == self.Root.key), the code doesn't set the new root's parent to None, which leads to unexpected behaviors. This is easy to fix by setting self.Root.parent = None after the update.

leor-c avatar May 23 '18 08:05 leor-c