Skip to content

Conversation

@hmigl
Copy link
Contributor

@hmigl hmigl commented Nov 7, 2023

This pull request refactors the existing 'BinaryTree' to 'BinarySearchTree' in the C++ codebase. The key changes are as follows:

  • Renamed 'BinaryTree' to 'BinarySearchTree' to emphasize its Binary Search Tree behavior, enforcing properties that ensure each node is greater than nodes in its left subtree and less than nodes in its right subtree.
  • Updated the README to reflect these changes.
  • Extended the 'BinarySearchTree' to include operations like 'delete', 'find min', and 'find max'. The code is now object-oriented, with 'BinarySearchTree' implemented as a class.
hmigl added 3 commits November 7, 2023 09:30
The 'Node *insert(Node *, int)' method makes the tree a Binary Search Tree, since it enforces these two properties: - Each node is greater than every node in its left subtree - Each node is less than every node in its right subtree
...like 'delete', 'find min', 'find max'. In addition to that, in this version, object oriented code is present. `BinarySearchTree` is a class, and it has behaviour that operates on the state.
Copy link
Owner

@kelvins kelvins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks @hmigl!

@kelvins kelvins merged commit 241c932 into kelvins:main Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants