Is_balanced Wrong answer
problem is here:
bool balanced(node* root)
{
if(root == NULL)
{
return 0;
}…
…
}
you should return true, instead of 0 which represents false.
please rate and resolve it if satisfied.
thanks
problem is here:
bool balanced(node* root)
{
if(root == NULL)
{
return 0;
}…
…
}
you should return true, instead of 0 which represents false.
please rate and resolve it if satisfied.
thanks