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

tip about method BinarySearchTree.replaceNodeWithNode() #148

Open
zzuklj opened this issue Jan 17, 2020 · 0 comments
Open

tip about method BinarySearchTree.replaceNodeWithNode() #148

zzuklj opened this issue Jan 17, 2020 · 0 comments

Comments

@zzuklj
Copy link

zzuklj commented Jan 17, 2020

this code is not wrong. I wonder can you modify it.
in my opinion, replacementNode must be a leaf node.
so if it is a left leaf node or a right leaf node,
just make sure replacementParent.lesser = null; or replacementParent.greater= null;

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

No branches or pull requests

1 participant