首页 > 技术文章 > 二叉树的子树

mmziscoming 2016-08-28 17:38 原文

bool hasSubTree(Bnode*parent,Bnode*son)

{

if(!son)

return tree;

if(!parent)

return false;

bool resul=false;

//都相等 退出

if(patent->val=son->val&&left)

 

else 

resul=SubTree(patent->left,son);

else

result=SubTree(patent->right,son)

//

}

bool SubTree(Bnode*p1,Bnode*p2)

{

if(p1->val==p2->val)

 

}

推荐阅读