public boolean isIdentical(TreeNode a, TreeNode b) {
// Write your code here
if(a == null && b == null){
return true;
}
if(a!=null && b!=null){
if(a.val == b.val){
return isIdentical(a.left,b.left) && isIdentical(a.right, b.right);
} else {
return false;
}
}
return false;
}