kunal-kushwaha / DSA-Bootcamp-Java

This repository consists of the code samples, assignments, and notes for the Java data structures & algorithms + interview preparation bootcamp of WeMakeDevs.
https://www.youtube.com/playlist?list=PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ
17.24k stars 11.07k forks source link

Update the code to find the height #1110

Closed Sudhi27Krishna closed 1 year ago

Sudhi27Krishna commented 1 year ago

Earlier the code was giving height as 3 for tree with 1000, which is wrong as the answer should be 9 ( Floor of log(1000) base 2 will be 9 )