Skip to content

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