华师大数据结构期中考试试卷(含答案).doc

华师大数据结构期中考试试卷(含答案).doc

ID:58698431

大小:55.50 KB

页数:10页

时间:2020-10-23

华师大数据结构期中考试试卷(含答案).doc_第1页
华师大数据结构期中考试试卷(含答案).doc_第2页
华师大数据结构期中考试试卷(含答案).doc_第3页
华师大数据结构期中考试试卷(含答案).doc_第4页
华师大数据结构期中考试试卷(含答案).doc_第5页
资源描述:

《华师大数据结构期中考试试卷(含答案).doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、..华东师范大学期中试卷2007—2008学年第二学期课程名称:______数据结构_____姓名:___________________学号:__________________专业:___________________年级/班级:__________________课程性质:专业必修一二三四五六七八总分阅卷人签名一、单项选择题(共18分,每题3分)1.Stackhasthepropertycalledlastinandfirstout,thenwhichofthefollowingdescribesthepropertyo

2、fQueue?a)Lastinandfirstoutb)Firstinandlastoutc)Firstinandfirstout2.Alistofitemsfromwhichonlytheitemmostrecentlyaddedcanberemovedisknownasa()a)stackb)queuec)circularlinkedlistd)list3.Ifthefollowingfunctioniscalledwithavalueof2forn,whatistheresultingoutput?voidQuiz(int

3、n){if(n>0){cout<<0;Quiz(n-1);cout<<1;Quiz(n-1);}}.zyzl....a)00011011b)11100100c)10011100d)01100011e)0011014.Aheapisalistinwhicheachentrycontainsakey,and,forallpositionsiinthelist,thekeyatpositioniisatleaseaslargeasthekeysinpositions2i+2and(),providedthesepositionsexi

4、stinthelist.a)2ib)2i-1c)2i-2d)2i+15.GiventherecursivefunctionintFunc(/*in*/inti,/*in*/intj){if(i<11)if(j<11)returni+j;elsereturnj+Func(i,j-2);elsereturni+Func(i-1,j);}whatisthevalueoftheexpressionFunc(12,15)?a)81b)62c)19d)72e)noneoftheabove6.Shellsortfinallyperforman

5、ordinary()?a)Heapsortb)Insertionsortc)Selectionsortd)Quicksort一、填空题(共22分,每空2分)1.Ifthefollowingfunctioniscalledwithavalueof75forn,theresultingoutputis_______【1】_________..zyzl....voidFunc(/*in*/intn){if(n>0){Func(n/8);cout<

6、_______【2】__________.templatevoidprint(List_entry&x){cout<mylist;for(inti=0;i<5;i++)mylist.insert(i,i);cout<<"Yourlisthave"<

7、traverse(print);mylist.clear();for(i=1;i<3;i++)mylist.insert(i,i);mylist.traverse(print);}3.Readthefollowingprogramandfilltheblanktocompletethemethod.templatestructNode{//datamembersNode_entryentry;Node*next;Node*back;//constr

8、uctorsNode();Node(Node_entryitem,Node*link_back=NULL,Node*link_next=NULL);};templatevoidLi

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

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

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