Same Tree
public boolean isSameTree(TreeNode p, TreeNode q) {
if (p == null && q == null) return true;
if (p != null && q == null) return false;
if (p == null && q != null) return false;
return isSameTree(p.left, q.left) &&
p.val == q.val &&
isSameTree(p.right, q.right);
}
标签:right,return,easy,isSameTree,&&,TreeNode,100,null,leetcode
From: https://www.cnblogs.com/iyiluo/p/16789183.html