Skip to content

Fixed remove bug where node has 2 children. #8

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

Conversation

pbouzakis
Copy link

When removing a node that has 2 children, and it's left subtree has no right descendants, the removal of the replacement from it's current position needs to be set on the replacement parents left pointer. This is due to the fact that it was found on the left pointer. Compared to the more normal condition where the left sub tree's with right children, that relationship will be found on the right pointer.

When removing a node that has 2 children, and it's left subtree has no right descendants, the removal of the replacement from it's current position needs to be set on the replacement parents left pointer. This is due to the fact that it was found on the left pointer. Compared to the more normal condition where the left sub tree's with right children, that relationship will be found on the right pointer.
@nzakas nzakas closed this in 8311318 Dec 26, 2018
@pbouzakis
Copy link
Author

Not merging :(

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