Is Balanced binary tree 1 wrong ans

ques- https://hack.codingblocks.com/contests/c/588/475
code-https://ide.codingblocks.com/s/84549

Hi @varshney641,
when you are entering an unbalanced tree then also your flag remains true so this gives wrong ans,Actually your flag will always remain true according to your code.Try to think a different logic.