int HeightOfBinatyTree1(BinaryTreeNode* pRoot) //二叉树的高度
{
if (pRoot == NULL)
return 0;
int m = HeightOfBinatyTree1(pRoot->_pLeft);
int n = HeightOfBinatyTree1(pRoot->_pRight);
return (m>n)? (m+1):(n+1);
}
void Destory(BinaryTreeNode*& pRoot)//销毁二叉树
{
if (pRoot == NULL)
return ;
if (pRoot->_pLeft)
Destory(pRoot->_pLeft);
if (pRoot->_pRight)
Destory(pRoot->_pRight);
delete(pRoot);
pRoot = NULL;
}