题目:
题解:
代码:
var isSymmetric = function (root) {
return dfs(root, root)
function dfs(p, q) {
if (p == null && q == null) return true
if (p == null || q == null) return false
if (p.val === q.val) {
return dfs(p.right, q.left) && dfs(p.left, q.right)
}
return false
}
};
ps(第二周,第五天)