We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Im not sure if this is expected behavior or not? I noticed that BSTree.remove() will not remove the node if it is the last one/root node in the tree?
assuming:
var tree = new BSTree(); // tree._count = 0 tree = tree.insert(100, 'yay'); //tree._count = 1 tree = tree.remove(100); //tree._count = 1 (expecting 0)
It appears that the BSTree will not remove the root node once one has been added. Is this correct/expected behavior?
Thanks!
The text was updated successfully, but these errors were encountered:
_count should go to 0, and the root should be set to null -- unless @sdtsui disagrees.
Sorry, something went wrong.
No branches or pull requests
Im not sure if this is expected behavior or not? I noticed that BSTree.remove() will not remove the node if it is the last one/root node in the tree?
assuming:
It appears that the BSTree will not remove the root node once one has been added. Is this correct/expected behavior?
Thanks!
The text was updated successfully, but these errors were encountered: