i have written the code for the problem check if the given tree is height balanced or not . my logic is correct but then also online editor shows run error while submitting. the output is also coming correct. please help
Why is my code showing run time error?
true 10 true 20 true 40 false false true 50 false false true 30 true 60 false false true 73 false false
got my mistake. i was taking ( “true” or “false” ) input for root node also.
thats why the code was node working. corrcted the mistake. thanks.