Is_Balanced (Binary Tree) : Taking Input

While taking input with string : code I’m getting the correct answer but while taking the input with a bool : code. I’m getting wrong-answer in Test Case -3.
Why is that?

check for the test case
1 true 2 true 7 true 6 false false false false true 5
u will find ur ans
Actually problem is with ur tree making in bool one

What’s the problem? @phantom

in tree making there is a problem

Can you please correct that in my code?

actually when u return the bool input taken is not right,it will have to make a lot of external stuff like cases,so not a good programming writing skill so string is better

1 Like

Okay! Thanks. @phantom