官方详解解释的很是优秀了 我就不贴代码了ui
反正思路就是递归code
https://leetcode-cn.com/problems/symmetric-tree/solution/dui-cheng-er-cha-shu-by-leetcode-solution/blog