自考考试

解析:二叉排序树的存储结构定义为以下类型: typedef int KeyT

来源:网考网自考 所有评论

【单选题】二叉排序树的存储结构定义为以下类型:
typedef int KeyType;
typedef struct node
KeyType key;/*关键字项*/
InfoType otherinfo;/*其它数据项*/
struet node*lchild,*rchild;/*左、右孩子指针*/
BSTNode,*BSTree;
阅读算法f33,并回答问题:

(1)对如图所示的二叉排序树T,写出f33(T,8)返回的指针所指结点的关键字;
(2)在哪些情况下算法f33返回空指针
(3)简述算法f33的功能。
BSTNode*f33BSTree T,KeyType x)
BSTNode*P;
if(T==NULL)return NULL;
p=f33(T—>lehild,x);
if(p!=NULL)return p;
if(T—>key>x)return T;
return f33(T—>rchild,x);

网考网参考答案:J
网考网解析:

暂无解析 document.getElementById("warp").style.display="none"; document.getElementById("content").style.display="block"; 查看试题解析出处>>

相关推荐

发布评论 查看全部评论