function isSymmetrical(pRoot){
return testCorrect( pRoot , pRoot );
}
function testCorrect(root1 , root2)
{
// write code here
if( root1 == null && root2 == null ){
return true;
}
if( root1 == null || root2 == null ){
return false;
}
if( root1.val != root2.val ){
return false;
}
return testCorrect( root1.right , root2.left ) && testCorrect( root1.left , root2.right );
/*
if( pRoot == null ){
return false;
}
if( pRoot.left != null && pRoot.right == null ){
return true;
}
if( pRoot.right != null && pRoot.left == null ){
return true;
}
while( pRoot.left != null && pRoot.right != null ){
if( pRoot.left.val == pRoot.right.val ){
return true;
}
}
*/
}