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

Honour minChildren with delete operation #196

Open
XuLei0 opened this issue Aug 18, 2023 · 1 comment
Open

Honour minChildren with delete operation #196

XuLei0 opened this issue Aug 18, 2023 · 1 comment
Labels

Comments

@XuLei0
Copy link

XuLei0 commented Aug 18, 2023

In the delete function in NonLeafHelper.java, nodes.isEmpty() is used to determine whether the node needs to be deleted. Shouldn’t the node be deleted when it is smaller than minChildren? For example, when the entries in a leaf node are less than minChildren, the leaf node needs to be deleted. If the operation results in the number of non-leaf nodes in the upper layer being less than minChildren, should these non-leaf nodes and their parent nodes need to be deleted?

@XuLei0 XuLei0 closed this as completed Aug 19, 2023
@XuLei0 XuLei0 reopened this Aug 19, 2023
@davidmoten
Copy link
Owner

it does look like you are correct. I'll put this on my list for sorting out. Thanks.

@davidmoten davidmoten added the bug label Sep 11, 2023
@davidmoten davidmoten changed the title I have some questions about the delete entry operation Honour minChildren with delete operation Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants