题目:
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.
分析:二叉树是递归结构,所以理所当然的想到递归
注意:以后不要一个劲的提交,一定要先检查再提交!!!!
题目:
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.
分析:二叉树是递归结构,所以理所当然的想到递归
注意:以后不要一个劲的提交,一定要先检查再提交!!!!