Same Tree
目录
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.
1 | //开始疏忽了其中一个节点为空的情况,val也忘了比较。。。 |
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.
1 | //开始疏忽了其中一个节点为空的情况,val也忘了比较。。。 |