对称二叉树--》leetcode

将根树进行拆分遍历,左子树的右节点要与右子树的左节点相等。java 下面是递归的作法:code class Solution { public boolean isSymmetric(TreeNode root) { if(root==null)return true; return check(root.left,root.right); }
相关文章
相关标签/搜索