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 of a problem with invariant 4 in the qtreetbl #66

Merged
merged 8 commits into from
Jul 13, 2020

Conversation

darmar-lt
Copy link
Contributor

Patch ads a test case for the invariant 4 in the qtreetbl and fixes the problem.

@@ -1050,6 +1195,11 @@ static qtreetbl_obj_t *put_obj(qtreetbl_t *tbl, qtreetbl_obj_t *obj,
if (is_red(obj->left) && is_red(obj->left->left)) {
obj = rotate_right(obj);
}

// split 4-nodes on the way up.
/*if (is_red(obj->left) && is_red(obj->right)) {
Copy link
Owner

Choose a reason for hiding this comment

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

can we remove this if this is not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed these comments in the last commit.

@wolkykim
Copy link
Owner

wolkykim commented Apr 4, 2019

thank you for the update. left a minor comment.

@wolkykim
Copy link
Owner

wolkykim commented Apr 7, 2019 via email

@wolkykim wolkykim merged commit 01e41a4 into wolkykim:master Jul 13, 2020
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