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

Update AVL.java #1447

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Logesh314
Copy link

Correction in calculation of height of the root node

Issue:

Given code incorrectly gives output as 3 for root node height when the number of nodes are 100 and 1000.

which is not correct as log base 2 of 1000 and 100 is 9.97 and 6.64.

Corrected code:

It gives 9 and 6 as output for 1000 and 100.

correction in calculation of height of the root node
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.

1 participant