Skip to content

Conversation

@amirsoroush
Copy link

In Chapter06/binary_search_tree.py, the current implementation of get_node_with_parent has two problems:

  1. The last line is unreachable.
  2. In case the removing item is not present in the tree, an exception is raised. That's because current will eventually be None and None doesn't have .data attribute. So I returned the same (None, None) value so that the .remove() method terminates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant