Same Tree

来源:互联网 发布:手机淘宝怎么找到社区 编辑:程序博客网 时间:2024/06/16 18:37

Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
题意:
题目:相同树,
给定两个二叉树,写一个函数检测它们是否相同。
只有当结构一致和结点的值一致的时候,才能认为这两个二叉树相同。

0 0
原创粉丝点击