DSA-Bootcamp-Java icon indicating copy to clipboard operation
DSA-Bootcamp-Java copied to clipboard

Update AVL.java

Open Logesh314 opened this issue 9 months ago • 0 comments

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.

Logesh314 avatar Feb 05 '25 18:02 Logesh314