-
Notifications
You must be signed in to change notification settings - Fork 931
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
A question about balance function in AVL #33
Comments
Hi @beblueblue thanks again for testing the code. I'll take a look at AVL tree later today and get back to you on this. About translating into Chinese, yes! Could you please create a Pull Request with a new folder |
About your AVL example, you are removing node 64, but what happened to node 48 and 128? They will remain in the tree unless you delete them explicitly. You should have something like this
I do see the issue when removing: 48
Is not doing rebalancing correctly. I'll fix that |
Hi @amejiarosario , when I finished the translation, I will create a Pull Request. |
When the node.balanceFactor > 1 and node.left.balanceFactor = 0, we do nothing with balance function.
As follows:
If we use the balance as follows, (when node.left.balanceFactor = 0, we do RR rotation.):
We can get this:
Do you think so?
I'd like to make a quest if I may. I want to translate your articles into Chinese. I wish more people could make a look of these wonderful articles! May I?
Thank you very much.
The text was updated successfully, but these errors were encountered: