Same Tree
2015-09-08 17:15
183 查看
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.
题意:
题目:相同树,
给定两个二叉树,写一个函数检测它们是否相同。
只有当结构一致和结点的值一致的时候,才能认为这两个二叉树相同。
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
题意:
题目:相同树,
给定两个二叉树,写一个函数检测它们是否相同。
只有当结构一致和结点的值一致的时候,才能认为这两个二叉树相同。