#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include <string.h>
#include<algorithm>
using namespace std;
struct nodetype{
int key;
nodetype* left;
nodetype* right;
};
typedef nodetype* node_pointer;
//算法3.8查找二叉树
void binsearchtree(node_pointer tree,int keyin,node_pointer &p)
{
bool found=false;
p=tree;
while(!found)
{
if(p->key==keyin)
{
found=true;
}
else of(keyin<p->key)
p=p->left;
else
p=p->right;
}
}
算法3.8查找二叉树
最新推荐文章于 2025-08-23 12:00:00 发布
1185

被折叠的 条评论
为什么被折叠?



