数据结构试卷(一)参考答案3199(data structure test paper (a) refer to answer 3199)

数据结构试卷(一)参考答案3199(data structure test paper (a) refer to answer 3199)

ID:16140082

大小:62.00 KB

页数:34页

时间:2018-08-08

数据结构试卷(一)参考答案3199(data structure test paper (a) refer to answer 3199)_第1页
数据结构试卷(一)参考答案3199(data structure test paper (a) refer to answer 3199)_第2页
数据结构试卷(一)参考答案3199(data structure test paper (a) refer to answer 3199)_第3页
数据结构试卷(一)参考答案3199(data structure test paper (a) refer to answer 3199)_第4页
数据结构试卷(一)参考答案3199(data structure test paper (a) refer to answer 3199)_第5页
资源描述:

《数据结构试卷(一)参考答案3199(data structure test paper (a) refer to answer 3199)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、数据结构试卷(一)参考答案3199(Datastructuretestpaper(a)refertoanswer3199)17,readagoodbook,likemakingagoodfriend--CangkejiaDatastructuretestpaper(a)referenceanswersFirst,themultiple-choicequestions(2pointspergame,20points)1.A,2.D,3.D,4.C,5.C,6.D,7.D,8.C,10.A,9.DTwo,fillintheblanks(1pointsperminute,26points)1.acc

2、uracy,readability,robustness,efficiency2.O(n)3.9334.-134X*+2Y*3/-5.2nn-1n+16.e2e7.directedacyclic8.n(n-1)/2n(n-1)9.(12,40)()(74)(23,55,63)10.increaseby111.O(log2n)O(nlog2n)12.mergeThree,thecalculationquestions(6pointspergame,24points)1.lineartablesare:(78,50,40,60,34,90)2.adjacencymatrix:Theadjacenc

3、ytableisshowninfigure11:Figure113.theminimumspanningtreeobtainedbytheKruskalalgorithmis:(1,2)3,(4,6)4,(1,3)5,(1,4)8,(2,5)10,(4,7)20;4.seeFigure12Figure12Four,readalgorithm(7pointspergame,atotalof14points)1.(1)querythetailnodeofthelist(2)linkthefirstnodetothetailofthelistasthenewtailnode(3)thereturne

4、dlineartablesare(A2,A3,...,an,A1)2.recursivetraversalchainstorageoftwoforktreeFive.Fillintheblanks(2centsperminute,8pointseach)TrueBST->leftBST->rightSix,writealgorithms(8points)IntCountX(LNode*,HL,ElemType,x){inti=0;LNode*p=HL;//iiscounterWhile(P,=NULL){if(P->data==x)i++;P=p->next;}//while,whenthel

5、oopisout,thevalueinIisthenumberofXnodesReturni;}//CountXDatastructuretestpaper(two)referenceanswerFirst,themultiple-choicequestion1.D,2.B,3.C,4.A,5.A,6.C,7.B,8.CTwo.Fillintheblanks1.constructagoodHASHfunctionanddeterminethesolutiontotheconflict2.stack.top++,stack.s[stack.top]=x3.order4.O(N2),O(nlog2

6、n)5.N0-1,2N0+N16.d/27.(31,38,54,56,,75,80,55,63)8.(1,3,4,5,2),(1,3,2,,4,5)Three.Applicationquestions1.(22,40,45,48,80,78),(40,45,48,,80,22,78)2.q->llink=p;q->rlink=p->rlink;p->rlink->llink=q;p->rlink=q;3.2,ASL=91*1+2*2+3*4+4*2)=25/94.treechainstoragestructureslightly,twoforktreeslightly5.E={(1,3),(1

7、,2),(3,5),(5,6),(6,4)}6.Four,algorithmdesignThe1.isprovidedwithasetofinitialrecordkeysequence(K1,K2,...,Kn),requiredtodesignanalgorithmtoO(n)timecomplexityinthelineartableisdividedintotwoparts,theleft

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

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

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