LeetCode100. 相同的树(dfs)(转载)
文章目录
1、题目描述
https://leetcode-cn.com/problems/same-tree/
给定两个二叉树,编写一个函数来检验它们是否相同。 如果两个树在结构上相同,并且节点具有相同的值,则认为它们是相同的。
输入: 1 1 / \ / \ 2 3 2 3 [1,2,3], [1,2,3] 输出: true2、代码详解

https://leetcode-cn.com/problems/same-tree/solution/xiang-tong-de-shu-by-leetcode-solution/
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论