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

Red black tree "remove" bug #8

Closed
wants to merge 2 commits into from

Conversation

greenfork
Copy link

Order of removals breaks the tree, tests show the problem. I have no idea of when of whether I will be able to fix this, feel free to take over.

@greenfork
Copy link
Author

Shorter bug reproduction:

  1. Insert nodes 12, 15, 47, 50, 60
  2. Remove 15

According to this visualisation before delete it should look like:
image

and after like this
image

but inspecting current implementation root is 47 and the deleted node 15 can be found as tree.root.?.right.?.left

@greenfork greenfork mentioned this pull request Jun 5, 2022
@alexrp
Copy link
Member

alexrp commented Oct 6, 2024

The intent with this repo is that the community can pick up these modules and turn them into proper, maintained packages. I would recommend doing exactly that with rb.zig and your fix here.

@alexrp alexrp closed this Oct 9, 2024
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