2012-2013(中加ds)期中试卷a答案

2012-2013(中加ds)期中试卷a答案

ID:34077742

大小:71.97 KB

页数:5页

时间:2019-03-03

2012-2013(中加ds)期中试卷a答案_第1页
2012-2013(中加ds)期中试卷a答案_第2页
2012-2013(中加ds)期中试卷a答案_第3页
2012-2013(中加ds)期中试卷a答案_第4页
2012-2013(中加ds)期中试卷a答案_第5页
资源描述:

《2012-2013(中加ds)期中试卷a答案》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、天津理工大学考试试卷2012〜2013学年度第一学期《数据结构》期中考试试卷课程代码:0666126试卷编号:1-A命题日期:2012年11月20日答题时限:45分钟考试形式:闭卷笔试得分统计表:umberScore^^InhiIVVI.Foreachquestion,choosethebestanswerandwriteitsletterclearlyasalargeplaincapitalintheanswerform・(4pointsforeachquestion,totalis40points.)ScoreN

2、ote:PleasewriteallofyouranswersinthefollowingsheetQuestionNumber12345678910AnswerACDADBBDCB1•Forasequentiallist(alistimplementedbyanarray),whichofthefollowingoperationisa0(1)algorithm?A.Accessthei-thelement(lWiWn)B.Insertanewelementafterthei-thelement(1WiWn)C.De

3、letethei-thelement(lWiWn)D.Alloftheabove2.Assumethatabinarytreewithnnodes,nodesonitsleveliatmost.A.2iB.2i+,C.2i_,D.2n3.TheaddresseswhichstoreLinkedList.A.mustbesequentialB.mustbepartlysequentialC.mustbenosequentialD.canbesequentialordiscontinuous2.ABinaryTreewil

4、lhavenodesonitsleveliatmost.A.2jB.2iC.2i+lD.2i_13.Inthecontextofthiscourse,whatarethemosttwoaspectsofalgorithmanalysis?A.Correctness&ConcisenessB.Readability&StandardizationC.Timecomplexity&SpacecomplexityD.Datacomplexity&Programcomplexity6-ConsiderthefollowingC

5、code,theBig-Ohrunningtimeis•sum=0;for(i=0;inext=p->next->nextB.p二p・>nextC-p二p・>next->nextD.ne

6、xt=p8-Inasinglylinkedlist,pandqpointto2differentnodes-Iftheelementofqisthepredecessorofp.theninsertnodesbetweenpandq.whichstatementiscorrect?A.s->next=p-next;p->next=s;B.q・>nex(=s;s->next=p;C-p->next=s->next;s->next=p;D.p->next=s;s->next=q;9.TheLinkedListisdesig

7、nedforconvenientlydataitem-A.gettingB.insertingC.findingD.locating10.Foradoublylinkedlist,ifwewanttoinsertanode(spointtoit)afterthenodethatppointto,whatshouldwedo?A.p->next=s;s->prior=p;p・>next・>prior=s;s->next=p・>next;Bep・>nex(=s;p->next->prior=s;s->prior=p;s->

8、next=p->next;C-s->prior=p;s->next=p・>next;p・>next=s;p->next->prior=s;D.s->prior=p;s->next=p->next;p->next->prior=s;p・>nex匸s;ILAnswerthefollowingquestions(Totalis40poi

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。