皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【简答题】
试题四 阅读下列函数说明和C函数,将应填入 (n) 处的字句写在答题纸的对应栏内。 [函数说明] 函数DeleteNode(Bitree *r,int e)的功能是:在树根结点指针为r的二叉查找(排序)树上删除键值为e的结点,若删除成功,则函数返回0,否则函数返回-1。二叉查找树结点的类型定义为: typedef struct Tnode{ int data; struct Tnode *Lchild,*Rchild; }*Bitree; 在二叉查找树上删除一个结点时,要考虑三种情况: 1若待删除的结点p是叶子结点,则直接删除该结点; 2若待删除的结点p只有一个子结点,则将这个子结点与待删除结点的父结点直接连接,然后删除结点p; 3若待删除的结点p有两个子结点,则在其左子树上,用中序遍历寻找关键值最大的结点s,用结点s的值代替结点p的值,然后删除结点s,结点s必属于上述1、2情况之一。 [函数代码] int DeleteNode(Bitree *r,int e) { Bitreep = *r, pp, s, c; while( (1) ) { /*从树根结点出发查找键值为e的结点*/ pp = p; if ( e< p->data) p = p -> Lchild; else p = p->Rchild; } if(!p) return –1; /* 查找失败 */ if(p->Lchild && p->Rchild) { /* 处理情况3 */ s = (2);pp = p; while ( (3) ) { pp = s; s = s-> Rchild; } p->data = s ->data; p = s; } /*处理情况1、2*/ if( (4) ) c = p -> Lchild; elsec = p -> Rchild; if(p == *r) *r = c; elseif ( (5) ) pp -> Lchild = c; elsepp->Rchild = c; free(p); return 0; }
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【单选题】关于内电层(Interal Plane)的描述中错误的是:
A.
可在内电层利用线条或弧线等绘制个封闭区间,即可将该区间分割为其他网络的板层
B.
可在内电层里,放置填充(Fill)矩形表示该区域内没有铜导体
C.
内电层只能为GND或VCC的单一网络板层
D.
若要浏览与编辑内层分割,可在PCB面板上方字段选择Split Plane Editor选项,切换到分割内层面板
【单选题】伴高钾血症的高血压患者禁用
A.
卡托普利
B.
氨氯地平
C.
氢氯噻嗪
D.
维拉帕米
E.
美托洛尔
【简答题】(英译中)He thought that web pages which had the most links to them from other web pages must be the most popular. The technique appeared to be successful.
【单选题】三相电机制中,相邻两相电压波形相差相位是
A.
变压器
B.
变送器
C.
发电机
D.
蓄电池
【单选题】伴高钾血症的高血压患者禁用
A.
螺内酯
B.
氨氯地平
C.
氢氯噻嗪
D.
维拉帕米
E.
美托洛尔
【多选题】汉语中有些说法与汉文化密切相关。英译我们习以为,常的词语时要考虑西方读者的理解与接收能力,常有必要增添注释以填补文化差异。比较以下四种译文中对“而立之年”的处理。你喜欢哪一种,为什么? 谁知道他将到“而立之年”,竟被小尼姑害得飘飘然了。
A.
How was it to be anticipated that at the late age of forty, he should be brought so low by a little nun so to feel that he was fluttering, flutteing, fluttering.
B.
Who would have thought that at the "age of moral independence" he should  be succumb to the evil spell of a little nun? age of moral independence: that is, thirty, at which Confucius was said to have achieved this state.
C.
Who should tell that close on thirty, when a man should "stand firm", he would lose his head like this over a little nun? stand firm: Confucius said at thirty he "stood firm". The phrase was later used to indicate that a man was thrity years old.
D.
Who could have possibly foreseen that just as he was approaching the age when, like Confucius, he should have "stood firm”, Ah Q would be so subverted by a yound Buddhist nun that he would go around walking on air. stand firm:  In a well-known passage of The Analects Confucius says, "At thiry, I stood firm."
【单选题】高血压伴高钾血症患者禁用
A.
螺内酯
B.
氨氯地平
C.
氢氯噻嗪
D.
维拉帕米缓释剂
E.
美托洛尔
【单选题】公共财政学研究的对象是( )。
A.
为弥补市场失灵而进行的经济活动
B.
满足政府需要的经济活动
C.
参与市场资源配置的经济活动
D.
向纳税人再分配的经济活动
【单选题】三相电机制中,相邻两相电压波形相差相位是
A.
180
B.
120
C.
90
D.
60
【简答题】将以下课文内容英译汉,写在一张纸上。拍照传回作业任务中。 “It’s not mine,” he said. “It’s a companycab. I got the idea years ago when Ihad a job as a clean-up man for the taxi company. Each car that came in at the end of th...
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题