采用递归那里应该是这样吧:return isSame(root1, root2) || HasSubtree(root1.left, root2) || HasSubtree(root1.right,root2);
7

相关推荐

牛客网
牛客企业服务