文档库 最新最全的文档下载
当前位置:文档库 › 习题2

习题2

习题2
习题2

1、实体属性值的变化范围是?

2、下列关于关系性质的说法中,正确的是?

A 可以出现相同的两行数据

B 一列中的数据不会相同

C 一列中的数据可能相同

D 行的顺序不能交换

3、设列车运行关系是:列车运行(车次,日期,实际发车时间,实际抵达时间,摘要),该关系的主码是?

4、在订单管理中,客户一次购物(一张订单)可以订购多种商品。设有订单关系R(订单号,日期,客户名,商品编码,数量),则R的主码是?

5、有关系:教学(学号,教工号,课程号),假定每个学生可以选修多门课,每个老师只能讲授一门课,每门课只能由一个老师来讲授,那么该关系的主码是?

6、包含在候选码中的属性称为?

7、关系R

8、在定义外码时,外码必须为另一个表的?

9、在关系数据库管理系统中,一个关系中的任意两个元组?

A 不能全同

B 可全同

C 必须全同

D 以上都不对

10、下列叙述正确的是?

A 关系中元组没有先后顺序,属性有先后顺序

B关系中元组有先后顺序,属性没有先后顺序

C关系中元组没有先后顺序,属性也没有先后顺序

D关系中元组有先后顺序,属性也有先后顺序

11、在关系中,有关属性描述不正确的是?

A 属性的顺序是非排序的

B 属性必须有不同的属性名

C 不同名的属性必须来自不同的域

D 所有的属性值都是原子的

12、不允许在关系中出现重复记录的约束是通过?实现的

A 外码

B 索引

C 主码

D 唯一索引

13、关系模型的实体完整性约束是指?

A 限制关系的任何属性不能为空值B限制关系的主码不能为空值

C 限制关系的外码不能为空值

D 限制非主属性值不能为空值

14、有关系:学生(学号,姓名,系别),规定学号的值域是8个数字组成的字符串,这一规则属于?

A 实体完整性约束

B 参照完整性约束

C 用户自定义完整性约束

D 关键字完整性约束

15、若关系R和S结构相同,各有10个元组,则R∪S的元组个数为?

16、把关系R和S的所有元组合并,再删除重复的元组,组成一个新关系,这种运算是传统集合运算中的?

17、关系R和S进行自然连接时,要求R和S中含有一个或多个公共的?

18、设有关系R(A,B,C)和S(A,D),则与R?S等价的关系代数表达式是:

A R ?S

B ∏R.A,B,C,D(R ×S)

C σR.A=S.A(R ×S)

D ∏R.A,B,C,D (σR.A=S.A(R ×S))

19、已知关系R(A,B),和S(A,C),其中A既是R的主码,又是S参照R的外码,并且A不取空值。若,R中有10个元组,S中有5个元组,则

∏ A (R) ∪∏ A (S) 中元组的范围?

A[5,10]B[5,15]

C[10,10]D[10,15]

20、有关系R(A,B,C)和S(B,C,D),下列不成立的关系代数表达式是?

A∏ A (R)?∏ D (S)BR?S

CR∪S D∏ B (R)∩∏ B (S)

21、已知关系R和S,R∩S等价于?

A (R-S)-S

B S-(S-R)

C (R-S)-R

D S-(R-S)

22、若关系R和S结构相同,各有10个元组,则R∩S的元组个数为?

23、设有关系R(A,B,C)和S(B,C,D),则R?S的属性个数是?

24、有关系R(A,B,C)和S(D,E,A)如下所示,则R?S的元组个数是?

25、已知学生、课程和学习3个关系如下:学生(学号,姓名,年龄,性别),课程(课程号,课程名,学时数),学习(学号,课程号,分数),要求通过关系运算生成下面的成绩关系:成绩(姓名,课程名,分数),下列正确的是?

A ∏姓名,课程名,分数(学生?学习)

B ∏姓名,课程名,分数(学生?课程)

C ∏姓名,课程名,分数(学习?课程) D∏姓名,课程名,分数(学生?学习?课程)

26、已知3个基本表S(学生,学号,性别,年龄),SC(学号,课程号,成绩)和C(课程号,课程名,任课教师名),若要查询选修了数据库课程的学生姓名,下列关系代数表达式不正确的是?

A ∏姓名(σ课程名=‘数据库’(S?SC?C))

B ∏姓名(σS.学号=SC.学号∧SC.课程号=C.课程号∧课程名=‘数据库’(S×SC×C))

C ∏姓名(S?SC?σ课程名=‘数据库’(C))

D ∏姓名(σ课程名=‘数据库’(S×SC×C))

27、设R的基数为K1,S的基数为K2,则R和S的笛卡尔积的基数为?

28、若D1={a1,a2,a3},D2={b1,b2,b3},则D1×D2集合中共有元组的个数是?

29、如果要改变一个关系中属性的排列顺序,应使用的关系运算是?

30、关系代数中,连接操作由?组合而成。

31、关系R(A,B)和S(B,C)中分别有10个和15个元组,属性B是R的主码,则R?S中元组个数的范围是?

32、已知关系R(A,B,C),另r为关系代数表达式∏AB(R?∏BC(R)))结果中所含的元组个数,s 为R中所含元组个数,则?

A r≤s

B r≥s

C r=s

D r≠s

33、已知两个关系R(A,B)和S(A,C),它们的主码都是A。R中有10个元组,S中有15个元组,

则∏A(R)∪∏A(S)中元组个数的范围是?

34、已知关系如下所示,从R和S中通过关系代数查询得到R’,则以下错误的是?

B 该查询中包含自然连接运算

C 该查询中包含投影运算

D 属性C是两个关系进行自然连接的公共属性

35、从一个表中取出满足某种条件的元组操作,即从横向进行选择所需的值,这属于关系数据库中的?操作。

36、当关系R和S进行自然连接时,能把R和S中原该舍弃的元组放到结果关系中的操作是?

37、设关系R和S的属性个数分别为r和s,则R×S操作结果的属性个数是?

38、学校数据库中有学生和宿舍两个关系:学生(学号,姓名)和宿舍(楼名,房间号,床位号,学号)。假设有的学生不住宿,床位也可能空闲。如果要列出所有学生住宿和宿舍分配的情况,包括没有住宿的学生和空闲的床位,则应执行?操作。

39、下列不正确的是?

A R=(R-S)∪(R∩S)

B R-S=R-(R∩S)

C R∩S=S-(R-S)

D R∩S=S-(S-R)

40、在关系代数中,可以用选择和笛卡尔积表示的运算是?

41、设关系R、S和T=R?S,且T、R、S的元组个数分别为k、m、n,则k、m、n之间的关系是?

A k<(m+n)

B k≤(m+n)

C k<(m×n)

D k≤(m×n)

42、关系代数表达式σ3=‘4’(S)表示?

43、下列错误的是?

A 自然连接是一种特殊的等值连接

B 自然连接要求两个关系中具有相同属性,而等值连接不需要

C 两种连接都可以只用笛卡尔和选择运算导出

D 自然连接要在结果中去掉重复的属性,而等值连接则不会去掉重复属性

44、当关系R和S进行自然连接时,结果能够保留R中不满足连接条件的元组的操作是?

45、已知关系R、S和R’,如下所示,要从R和S中通过关系代数得到R’,则关系代数表达式为?

46、设关系R(A,B)中包含3个元组,S(A,D,E)中包含2个元组,则R和S进行自然连接后所得关系的的基数为?

47、若在学生(学号,姓名,性别,年龄,专业号)关系中,查询学生的姓名和年龄两个属性,其关系代数表达式为?

48、设有学生表S (学号,姓名,班级)和学生选课表SC (学号,课程号,成绩),为了维护数据一致性,S 和SC 之间应满足?完整性约束。

49、设有职工关系employee (职工号,姓名,性别,技能),有关系代数表达式: ∏1,2,4(employee )÷∏4(σ2=‘CHEN ‘(employee )),请写出该表达式所表示的查询内容。 50、已知关系R (A,B )和S (C,D ),有两个等价的关系代数表达式: ∏A (σB=C ∧D=99(R ×S)) 和 ∏A (σB=C (R ×(σD=99(S)))),分析哪个执行效率更高? 51、已知关系V 和W ,如下所示

V ÷W=?

52、设关系R 和S

如下:

请写出∏1,2,3,6(R ?

2=2S )的结果

53、设某公司数据库中的关系模式如下:

职工(职工号,职工名,性别,年龄) 工作(职工号,公司号,工资) 公司(公司号,公司名,地址)

请用关系代数表达式写出查询: ⑴不在开元公司工作的所有职工的职工号? ⑵不在开元公司工作的所有职工的职工名?

54、设有学生,课程,选课关系:S(sno,sname,sex),C(cno,cname),SC(sno,cno,gmark),现有关系代数表达式的查询为:∏sname (σ

cname=’操作系统’(S

?SC ?C),写出它的优化表达式。

55、设有下列关系模式:

学生关系S (学号,姓名,年龄,班号) 选课关系SC (学号,课程号,成绩) 请用关系代数表达式完成下列查询:

1、查询成绩不及格的学生的学号、姓名和课程号

2、查询没有选修C1课的学生的学号和姓名

3、查询没有选修C1或C2课的学生的学号

4、查询至少选修了C1和C2课的学生的学号

5、查询选修了C1课的学生的姓名、课程号和成绩

6、查询选修了所有课程的学生的学号和姓名

56、设有以下关系:

职工(职工号,姓名,性别,职务,家庭地址,部门编号)

部门(部门编号,部门名称,地址,电话)

保健(保健卡编号,职工号,检查身体日期,健康状况)

请用关系代数表达式写出查询:⑴查找所有女科长的姓名和家庭地址⑵办公室的科长的姓名和家庭住址(3)财务科中健康状况为良好的职工姓名和家庭住址

57、设有如下所示的关系S(S#,SNAME,AGE,SEX)、C(C#,CNAME,TEACHER)和SC(S#,C#,GRADE),试用关系代数表达式表示下列查询语句:

(1)检索“张三”老师所授课程的课程号(C#)和课程名(CNAME)。

(2)检索年龄大于21的男学生学号(S#)和姓名(SNAME)。

(3)检索至少选修“张三”老师所授全部课程的学生姓名(SNAME)。

(4)检索”李四”同学不学课程的课程号(C#)。

(5)检索至少选修两门课程的学生学号(S#)。

(6)检索全部学生都选修的课程的课程号(C#)和课程名(CNAME)。

(7)检索选修课程包含“张三”老师所授课程之一的学生学号(S#)。

(8)检索选修课程号为k1和k5的学生学号(S#)。

(9)检索选修全部课程的学生姓名(SNAME)。

(10)检索选修课程包含学号为2的学生所修课程的学生学号(S#)。

(11)检索选修课程名为“数据库”的学生学号(S#)和姓名(SNAME)。

数据结构实验2.1顺序表

附页(实验2-1代码): 头文件“DEFINE2-1.h”: #define MaxSize 10 typedef struct { char data[MaxSize]; int length; }SqList; #include #include #include"DEFINE2-1.h" void InitList(SqList * &L) //初始化线性表 { L = (SqList*)malloc(sizeof(SqList)); //分配存放线性表的空间L->length = 0; //置空线性表长度为0 } bool ListInsert(SqList *&L, int i, char e) //插入数据元素 { int j; if (i<1 || i>L->length + 1) return false; //参数错误是返回false I--; //将顺序表逻辑序号转换为物理序号for (j = L->length; j>i; j--) //将data[i]及后面元素后移一个位置L->data[j] = L->data[j - 1]; L->data[i] = e; //插入元素e L->length++; //顺序表长度+1 return true; //成功插入返回true } void DispList(SqList *L) //输出线性表L { int i; for (i = 0; ilength; i++) //扫描顺序表输出各元素值printf("%3c", L->data[i]); printf("\n\n"); } int ListLength(SqList *L) //求线性表L的长度 { return (L->length); }

全新版大学英语综合教程2[第二版]课后答案解析

Unit1 Ways of Learning Vocabulary I 1. 1)insert 2)on occasion 3)investigate 4)In retrospect 5)initial 6)phenomena 7)attached 8)make up for 9)is awaiting 10)not; in the least 11)promote 12)emerged 2. 1) a striking contrast between the standards of living in the north of the country and the south. 2)is said to be superior to synthetic fiber. 3)as a financial center has evolved slowly. 4)is not relevant to whether he is a good lawyer. 5)by a little-known sixteen-century Italian poet have found their way into some English magazines. 3. 1)be picked up; can’t accomplish; am exaggerating 2)somewhat; the performance; have neglected; they apply to 3)assist; On the other hand; are valid; a superior II 1. 1)continual 2)continuous 3)continual 4)continuous 2. 1)principal 2)principal 3)principle 4)principles 5)principal III 1.themselves 2.himself/herself 3.herself/by herself/on her own 4.itself 5.ourselves 6.yourself/by yourself/on your own Comprehensive Exercises I.cloze 1.

c数据结构习题2(顺序表)

顺序线性表习题 1.已知一个向量A中的元素按元素值非递减有序排列,编写一个过程插入一个元素x后保持该向量是有序的。 Type vector=array[0..max] of integer; Procedure insert (var A: vector ;var n,x:integer); Var i,j:integer; Begin If (x>=A[n]) then A[n+1]:=x Else begin i:=1; While (x>=A[I]) do i:=i+1; For j:=n downto A[j+1]:=A[j]; A[i]:=x;n:=n+1; end; End; 2.已知一个向量中的元素按元素值非递减有序排列,编写一个过程删除向量中多余的值相同的元素。 Procedure del(var A:vector;var n:integer); Var I;j:integer; Begin i:=1; While(i<=n-1) do If (A[i]<>A[i+1]) then i:=i+1 Else begin for j:=(i+2) to n do A[j-1]:=A[j]; n:=n-1;end;end;

3.编写一个过程将一个向量A(有n个元素)分拆成两个向量,使A中大于等于0的元素存放在B中,小于0的元素存放在C中。 4.已知在一维数组A[1:m+n]中依次存放着两个向量(a1,a2,…,a m)和(b1,b2,…, b m),编写一个过程将两个向量的位置互换,即把(b1,b2,…,b m)放到(a1,a2,…, a m)的前面。 Procedure exchang(var A:vector;m,n:integer); Var i,j,t:integer; Begin read(m,n); For i=1 to m+n Read(A[i]); For i:=m downdo 1 step –1 Begin t:=A[i]; A[i+j]:=A[i+j+1]; A[i+n]:=t; End; For i:=0 to m+n Write(A[I]); End;

大学英语综合教程2课后答案

大学英语综合教程2课后答案 Unit 1 Text A Vocabulary I. 1.1) insert 2) on occasion 3) investigate 4) In retrospect 5) initial 6) phenomena 7) attached 8) make up for 9) is awaiting 10) not?in the least 11) promote 12) emerged 2. 1) There is a striking contrast between the standards of living in the north of the country and the south. 2) Natural fiber is said to be superior to synthetic fiber. 3) The city’ s importance as a financial center has evolved slowly. 4) His nationality is not relevant to whether he is a good lawyer. 5) The poems by a little-known sixteenth-century Italian poet have found their way into some English magazines. 3. 1) be picked up, can’ t accomplish, am exaggerating 2) somewhat, performance, have neglected, they apply to 3) assist, On the other hand, are valid, a superior II.

全新版大学英语(第二版)综合教程2课后答案及翻译

全新版大学英语(第二版)综合教程2课后答案及翻译 9大学英语练习册2 9单元1 ★课文a 词汇I. 1.1)插入2)在场合3)调查4)回顾5)最初的现象 7)附上8)弥补9)正在等待10)不…至少11)促进1 2)出现 2。这个国家的北部和南部的生活水平有着鲜明的对比。据说天然纤维优于合成纤维。这座城市作为金融中心的重要性发展缓慢。4)他的国籍与他是否是一名好律师无关。一位鲜为人知的16世纪意大利诗人的诗被一些英文杂志转载。 3。1)捡起来,不能完成,有点夸张 2)表现,忽略了,他们申请3)协助,另一方面,是有效的,一个上级2。 1。1)连续2)连续3)连续4)连续 2。1)原则2)原则3)原则4)原则5)原则3。 1。他们自己2。他/她自己3。她自己/独自/独自一人。本身5。我们自己。你自己/你自己/你自己的综合练习一。完形填空 1。1)对比2)夸大3)优先级4)另一方面5)提升 6)拾起7)协助8)完成9)偶尔10)忽略 11)值得的12)优越的 2。1)结束2)执行3)面对4)胜任5)装备

6)设计7)方法8)休息9)绝对10)质量 2。翻译 1。1)背离传统需要巨大的勇气。汤姆过去很害羞,但这次他足够大胆,在一大群观众面前表演了一场。 3)许多教育者认为在孩子很小的时候培养他们的创新精神是可取的。假设这幅画真的是一幅杰作,你认为它值得买吗? 5)如果数据在统计上是有效的,它将揭示我们正在调查的问题。2。为了提高我们的英语,多读、多写、多听、多说是至关重要的。此外,背诵尽可能多的好文章也很重要。如果你头脑中没有大量优秀的英语写作,你就不能用英语自由地表达自己。在学习过程中总结我们的经验也是有帮助的,因为这样做,我们可以找出哪种学习方式更有效,会产生最理想的结果。只要我们继续努力,我们将在适当的时候完成掌握英语的任务。★文本B 理解检查:c c d a c b语言练习1。g h e c f a b d 2。1)采用2)账户3)从你的角度来看4)最终5)此外6)基金7)年度跟踪9)步调10)打算11)观点12)设计 单元2 ★文本A词汇表 1。1.1)突如其来的情感3)祝福4)磨损5)日期 6)后果7)似乎8)与9)好奇10)真正的11)主要是12)情感 2)相反。1)当你面临不止一个问题时,先试着解决最简单的一个。水对于所有生命形式的存在都是至关重要的。

顺序表的基本操作 (2)

顺序表的基本操作 /*sqList.h 文件*/ #define LIST_INIT_SIZE 50 /*初始分配的顺序表长度*/ #define INCREM 10 /*溢出时,顺序表长度的增量*/ #define OVERFLOW 1 #define OK 0 #define ERROR -1 typedef int ElemType; /*定义表元素的类型*/ typedef struct SqList{ ElemType *elem; /*存储空间的基地址*/ int length; /*顺序表的当前长度*/ int listsize; /*当前分配的存储空间*/ }SqList; /*sqListOp.h 文件*/ #include "Sqlist.h" int InitList_sq(SqList &L); //顺序表创建函数定义 void FreeList_sq(SqList &L); //顺序表销毁函数定义 int ListInsert_sq(SqList &L, int i, ElemType e); //在顺序表的位置i插入元素e void PrintList_sq(SqList &L); //遍历并输出顺序表所有元素 int ListDelete_sq(SqList &L, int i,ElemType &e); //删除顺序表第i个元素的 bool ListEmpty(SqList &L); //判断顺序表是否为空 int LocateElem_sq(SqList L,ElemType e); //在顺序表里查找出第1个与e相等的数据元素位置//已知线性表La和Lb的元素按值非递减排列 //归并后的La和Lb得到新的顺序线性表Lc,Lc的元素也是按值非递减排列 void MergeList_sq(SqList La,SqList Lb, SqList &Lc); /*sqListOp.cpp文件*/ #include #include #include #include "sqlistOp.h" //创建顺序表 int InitList_sq(SqList &L) { L.elem = (ElemType*)malloc(LIST_INIT_SIZE*sizeof(ElemType)); if (!L.elem) exit(OVERFLOW); /*初始化失败,返回0*/ L.length = 0; /*置空表长度为0*/ L.listsize = LIST_INIT_SIZE; /*置初始空间容量*/ return OK; /*初始化成功,返回1*/

新世纪大学英语综合教程2课后答案(全)

1.Only those who have lived through a similar experience can fully appreciate this. 只有那些有过类似经历的人,才能够完全理解这一点。 2. Scientists have been hard pressed to figure out how these particles form and interact . 科学家一直没弄明白这些粒子是怎么形成的、又是如何相互作用的。 3. I’d like to express my special thanks to everyone who has contributed over the years in one way or another. 我要特别感谢每一个在这些年来以不同方式作出贡献了的人。 4. The individual success of the employees in a team environment results in success for the company. 团队环境中员工个人的成功能带来公司的成功。 5. The war, although successful in military terms, left the economy almost in ruins. 这场战争,虽说从军事角度而言是成功的,却另经济几乎崩溃。 6. He decided to channel his energies into something useful, instead of being glued to the TV set all day. / instead of sitting in front of the TV set all day long. 他决定把自己的精力用在有益的事上,而不是整天守在电视机前。 7. There is a difference between strength and courage. It takes strength to survive. It takes courage to live. 力量与勇气是有区别的。生存需要力量,生活需要勇气。 8. She was by nature a very affectionate person, always ready to give a helping hand to others. 她天生是个温柔亲切的人,总是乐于向别人伸出援手。 Unite 6 1.It is only by trail and error that we learn and progress / make progress. 只有通过反复实践我们才能学习和进步。 2.You should know that the education of the heart is very important. It will distinguish you from others. 你应该知道心灵的教育是很重要的。它会使你与众不同。 3. A person who strives for perfection tends to have a low threshold of pain. Things around bother them. 一个追求完美的人对痛苦的容忍度往往很低。周围的事物都会让他们看不顺眼。 4.They regard honesty as a matter of principle and they are willing to sacrifice everything for its sake. 他们认为正直是个原则问题,愿意为之牺牲一切。 6.People judge you by the company you keep. You are inviting trouble if you get into bad company. 人们根据你交往的朋友来判断你。如果与坏人为伍,你就是自找麻烦。 6) Speaking your mind without regard to other people’s feelings is not a virtue. 直言不讳、不顾其他人的感受不是一种美德。 7) Her sensitivity exposes her to more suffering and pain than ordinary people can imagine. 她的敏感另她承受的痛苦比普通人所能想象的要多。 8) We must awaken people to the need to protect our environment. 我们必须使人们意识到保护坏境的必要性。

综合教程2课后答案

全新版大学英语综合教程(第二版)2 TextA参考答案 Unit 1 Text A After listening 1. much more advanced 2. apply some academic pressure, gave in to his pleas/gave up 3. a duck takes to water 4. memorizing (stuff), thinking 5. ample space to grow Text Organization 1-1 The text begins with an anecdote. 1-2 His thoughts are mainly about different approaches to learning in China and the West. 1-3 He winds up the text with a suggestion in the form of a question. 2. 1, show a child how to do something, or teach by holding the hand; teach children that they should rely on themselves for solutions to problems. 2,give greater priority to developing skills at an early age,believing that creativiy can be promoted over time. Put more emphasis on fostering creativity in young children, thinking skills can be picked up later. Language Sense Enhancement (1) summarizing (2) value originality and independence (3) contrast between (4) in terms of (5)harbor (6)fearful (7) comparable (8) promote creativity (9)emerge (10) picked up

综合教程2(第二版)课后翻译答案

To improve our English, it is critical to do more reading, writing, listening and speaking. Besides, learning by heart as many well-written essays as possible is also very important. Without an enormous store of good English writing in your head you cannot express yourself freely in English. It is also helpful to summarize our experience as we go along, for in so doing, we can figure out which way of learning is more effective and will produce the most desirable result. As long as we keep working hard on it, we will in due course accomplish the task of mastering English. Unit 2 With more and more donations coming in, our university will be much better off financially next year. We will thus be able to focus on the most important task that we, educators, must take on: to encourage students to attain their scholarly/academic goals, to train them to be dependable and responsible individuals, to prepare them for the life ahead, and to guide them in their pursuit of spiritual as well as material satisfaction. Unit 3 George, the son of Mr. Johnson, liked listening to heavy metal music in the evenings, which made it hard for other residents in the community to fall asleep. Eventually the exhausted neighbors lost their patience and decided on direct interference. They called Mr. Johnson to tell him in a frank manner what they were thinking. Mr. Johnson assured them that he would certainly settle the issue. As soon as he put down the phone he scolded his son, “What has come over you? You should know better than to disturb others for your own amusement.”In the end George traded his CDs for computer games software from his classmates. Unit 4 Perhaps you envy me for being able to work from home on the computer. I agree that the Internet has made my job a lot easier. I can write, submit and edit articles via email, chat with my colleagues on line and discuss work with my boss. With a click of the mouse, I can get all the data I need and keep up with the latest news. But then, communicating through the Net can be frustrating at times. The system may crash. Worse still, without the emotional cues of face-to-face communication, the typed words sometimes seem difficult to interpret. Unit5 Numerous facts bear out the argument/statement/claim that in order to recover speedily from negative emotion, you should allow yourself to cry. Y ou needn't/ don't have to be ashamed of crying. Anxiety and sorrow can flow out of the body along with tears. Consider the case of /Take Donna. Her son unfortunately died in a car accident. The intensity of the blow made her unable to cry. She said, "It was not until two weeks later that I began to cry. And then I felt as if a big stone had been lifted from my shoulders. It was the tears that brought me back to earthand helped me survive the crisis."

实验二顺序表及链表

常熟理工学院 《数据结构与算法》实验指导与报告书 __2017_学年第__1__ 学期 专业:物联网工程___________________________ __ 学号:__________________________ ____ 姓名:________________________________ __ 实验名称:顺序表与链表_______________________________ 实验地点:N6-210_____________________________ ____ 指导教师:聂盼红__________________________ ___

计算机科学与工程学院 2017

实验二顺序表与链表 【实验目的】 1、掌握线性表中元素的前驱、后续的概念。 2、掌握顺序表与链表的建立、插入元素、删除表中某元素的算法。 3、对线性表相应算法的时间复杂度进行分析。 4、理解顺序表、链表数据结构的特点(优缺点)。 【实验学时】 4学时 【实验预习】 回答以下问题: 1、顺序表的存储表示 在顺序表中,任一数据元素的存放位置是从起始位置开始、与该数据元素的位序成正比的对应存储位置,借助LOC(ai)=LOC(a1)+(i-1)*1确定,则顺序表是一种随机存取的存储结构。 2、单链表的存储表示 线性链表也称单链表,在每一个结点中只包含一个指针,用于指示该结点的直接后继结点,整个链表通过指针相连,最后一个结点因为没有后继结点,其指针置为空(NULL)。这样,链表中所有数据元素(结点)构成一对一的逻辑关系,实现线性表的链式存储。 【实验容和要求】 1、按照要求完成程序exp2_1.c,实现顺序表的相关操作。以下函数均具有返回值,若操作完成,返回OK,操作失败返回ERROR。函数需返回的其他数据,使用函数参数返回。exp2_1.c部分代码如下: #include #include #define ERROR 0 #define MAXSIZE 100 #define OK 1 typedef int ElemType; /*定义表元素的类型*/ typedef struct slist{ ElemType *list; int listsize; int length;

全新版大学英语综合教程2课后习题答案.doc

全新版大学英语综合教程答案~~最最最最新版,符合书本篇章哦~~ 来源:江湉的日志 Unit 1 Key to Exercises Part I Pre-Reading Task Script for the recording: Ways of learning is the topic of this unit. It is also the topic of the song you are about to listen to, called Teach Your Children sung by Crosby, Stills and Nash. Teach Your Children Crosby, Stills and Nash You, who are on the road, Must nave a code that you can live by. And so, become yourselr, Because the past is just a goodbye. Teach your cbildren well, Their lather's hell did slowly go by. And reed them on your dreams, The one they picks, the one you'll mow by. Don't you ever ash them why, ir they told you, you will cry, So just look at them and sigh and know they love you. Appendix I - 93 - And you, oi tender years,

全新版大学英语综合教程2课后答案(20200702084530)

全新版大学英语综合教程 2 课后习题答案 Key to Exercises of College English Book 2 Unit 1 ★Text A Vocabulary I. 1.1) insert 2) on occasion 3) investigate 4) In retrospect 5) initial 6) phenomena 7) attached 8) make up for 9) is awaiting 10) not …in the least 11 epjednote 12) em 2. 1) There is a striking contrast between the standards of living in the north of the country and the south. 2) Natural fiber is said to be superior to synthetic fiber. 3) The city 's importance as a financial center has evolved slowly. 4) His nationality is not relevant to whether he is a good lawyer. 5) The poems by a little-known sixteenth-century Italian poet have found their way into some English magazines. 3. 1) be picked up, can 't accomplish, am exaggerating 2) somewhat, performance, have neglected, they apply to 3) assist, On the other hand, are valid, a superior II. 1. 1) continual 2) continuous 3) continual 4) continuous 2. 1) principal 2) principal 3) principle 4) principles 5) principal III. 1. themselves 2. himself/herself 3. herself/by herself/on her own 4. itself 5. ourselves 6. yourself/ by yourself/on your own Comprehensive Exercise I. Cloze 1. 1) contrast 2) exaggerating 3) priority 4) on the other hand 5) promoting 6) pick up 7) assist 8) accomplish 9) on occasion 10) neglecting 11) worthwhile 12) superior 2. 1) end 2) perform 3) facing 4) competent 5) equipped 6) designed 7) approach 8) rest 9) definitely 10) quality II. Translation 1.1) It takes an enormous amount of courage to make a departure from the tradition. 2) Tom used to be very shy, but this time he was bold enough to give a performance in front of a large audience. 3) Many educators think it desirable to foster the creative spirit in the child at an early age. 4) Assuming (that) this painting really is a masterpiece, do you think it 'wsorthwhile to buy/purchase it? 5) If the data is statisti cally valid, it will throw light on the problem we are investigating. 2. To improve our English, it is critical to do more reading, writing, listening and speaking. Besides, learning by heart as many well-written essays as possible is also very important. Without an enormous store of good English writing in your head you cannot express yourself freely in English. It

全新版大学英语综合教程2课后答案

Unit 1 Page 14-16: Vocabulary I.Fill in the gaps with words or phrases given in the box. Change the form where necessary. 1.insert 2.on occasion 3.investigate 4.in retrospect 5.initial 6.phenomena 7.attached 8.make up for 9.is awaiting 10.not…in the least 11.promote 12.emerged II.Rewrite each sentence with the word or phrase in brackets, keeping the same meaning. The first part of the sentence has been written for you. 1. a striking contrast between the standards of living in the north of the country and the south. 2.is said to be superior to synthetic fiber. 3.as a financial center has evolved slowly. 4.is not relevant to whether he is a good lawyer. 5.by a little-known sixteenth-century Italian poet have found their way into some English magazines. III Complete the sentences, using the words or phrases in brackets. Make additions or changes where necessary. 1.be picked up… can’t accomplish…am exaggerating… 2.somewhat… the performance… have neglected… they apply to… 3.assist…On the other hand… are valid… a superior… Page 16-17: Confusable Words 1.continual continuous continual continuous 2.principal principal principle principles principal Page 18: Usage

大学英语综合教程2课后答案

大学英语综合教程2 课后答案 Unit 1 Text A Vocabulary I. 1.1)insert 2) on occasion 3) investigate 4) In retrospect 5) initial 6) phenomena 7) attached 8) make up for 9) is awaiting 10) not ?in the least 11) promote 12) emerged 2. 1)There is a striking contrast between the standards of living in the north of the country and the south. 2)Natural fiber is said to be superior to synthetic fiber. 3)The city 's importance as a financial center has evolved slowly. 4)His nationality is not relevant to whether he is a good lawyer. 5)The poems by a little-known sixteenth-century Italian poet have found their way into some English magazines. 3. 1) be picked up, can ' t accomplish, am exaggerating 2)somewhat, performance, have neglected, they apply to 3)assist, On the other hand, are valid, a superior II.

全新版大学英语综合教程2课后练习答案

全新版大学英语综合教程2课后练习答案 Key to Exercises of College English Book 2 Unit 1 ★ Text A Vocabulary I. 1)To use the machine, first insertthe correct cions,then select the drink you want and button. 使用这台机器,首先插入正确的硬币,然后选择你想喝和按钮。 2)Professor Smith translated not only from the French but also,on occasion,from the Polish. 史密斯教授翻译不仅从法国也,有时,来自波兰。 3)Food chemists will investigatethe health food on sale to see if it really dose give the benefits claimed. 食品化学家将调查在销售保健食品是否真的剂量给人的利益。 4)In retrospect,it was the wrong time to open anew data processing center in this city. 回想起来,那是打开新的数据处理中心在这个城市,错误的时间。 5)Myinitialreaction to the news was relief,but as I thoughtmore about it I began to feel angry. 听到这个消息我最初的反应是救济,但我想一下我开始感到愤怒。 6)A full understanding of mathematics is sufficient to explain a wide variety of naturalphenomena. 一个全对数学的理解是足以解释各种各样的自然现象。 7)Make sure the label is firmly attachedto the parcel before you mail it. 确保标签牢牢地贴在包裹邮寄前。

相关文档
相关文档 最新文档