BST二叉搜索树的查找算法
bool SearchBST(TreeNode *pRoot,int key)
{
bool result = false;
if(pRoot==NULL)
return result;
if(key == pRoot->val)
result = true;
else if(key<pRoot->val)
result = SearchBST(pRoot->left,key);
else
result = SearchBST(pRoot->right,key);
return result;
}
将继续学习BST的插入、删除操作