Skip to content

Conversation

@jiyadurai
Copy link

Overview: What does this pull request change?

This pull request adds an implementation of a binary search tree that inherits from NaryTree

Motivation and Explanation: Why and how do your changes improve the library?

This adds simpler operations for constructing binary search trees. Using insert and remove in the BSTree class does not require the user to know the exact positions where they wish to place nodes.

Further Information and Comments

If bs_tree.py is run as a script, then it animates an example with some insertions and a removal. Some notes: if the height gets too large, the animation looks bad. Also, I haven't run into any issues, but the changes are not tested thoroughly.

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added code segments are adequately covered by tests
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant