Skip to content

Latest commit

 

History

History

100. Same Tree

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
Given two binary trees, write a function to check if they are the same or not. 
Two binary trees are considered the same if they are structurally identical and the nodes have the same value. 
判断两棵树是否一样。

递归判断当前节点相同,左右子树相同即可。