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

Fix miss assign value when deleting a node #9

Merged
merged 2 commits into from
Nov 22, 2017
Merged

Conversation

tvnhan
Copy link
Contributor

@tvnhan tvnhan commented Nov 22, 2017

var inOrderSuccessor = minValueNode(root.right);
root.key = inOrderSuccessor.key;
root.value = inOrderSuccessor.value; //missing here

tvnhan and others added 2 commits November 22, 2017 16:32
var inOrderSuccessor = minValueNode(root.right);
            root.key = inOrderSuccessor.key;
            root.value = inOrderSuccessor.value;  //missing here
@Tyriar
Copy link
Member

Tyriar commented Nov 22, 2017

@tvnhan nice catch thanks 😃

I fixed the lint and improved the tests to cover this case.

@Tyriar Tyriar merged commit a6969fb into gwtw:master Nov 22, 2017
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.

2 participants