Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #13 - BST Tree #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mohammadjafari80
Copy link

I looked into the code and actually, there is a tiny problem with it. There is an iteration in the Delete function which keeps traversing the tree until it finds the right place for the desired Node. It's going to return false in case of unavailability of that value but otherwise, it eventually goes into the last case which means the node h and node n have the same values but this doesn't 100 percent guarantee that they are equal in terms of an object so we can't use one instead of the other. Therefore we should change the n to h in line 136. This can actually may cause unwanted modification in some cases.

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