private boolean structurallyIdentical(Node t, Node o) {
if(t==null && o==null)
return true;
if((t==null && o!=null) || t!=null && o==null)
return false;
if(t.data==o.data)
{
boolean l=structurallyIdentical(t.left, o.left);
boolean r=structurallyIdentical(t.right, o.right);
if(l==true && r==true)
{
return true;
}
else
return false;
}
else
return false;
}
this is the function code. it is working fine on dry run. what to change?