README ¶ 对称二叉树 easy 给定一个二叉树,检查它是否是镜像对称的。 例如,二叉树 [1,2,2,3,4,4,3] 是对称的。 1 / \ 2 2 / \ / \ 3 4 4 3 但是下面这个 [1,2,2,null,3,null,3] 则不是镜像对称的: 1 / \ 2 2 \ \ 3 3 进阶: 你可以运用递归和迭代两种方法解决这个问题吗? Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type TreeNode func PreIn2Tree(pre, in []int) *TreeNode Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type TreeNode ¶ type TreeNode struct { Val int Left *TreeNode Right *TreeNode } func PreIn2Tree ¶ func PreIn2Tree(pre, in []int) *TreeNode Source Files ¶ View all Source files main.goutil.go Click to show internal directories. Click to hide internal directories.