private boolean structurallyIdentical(Node n1, Node n2) {
if(n1==null && n2==null)
{
return true;
}
if(n1!=null && n2!=null)
{
return n1.data==n2.data && structurallyIdentical(n1.left,n2.left) &&
structurallyIdentical(n1.right,n2.right);
}
return false;
}