您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 资本运营 > 《数据结构》期末考试题及答案
12011-20121101.niA.O(0)B.O(1)C.O(n)D.O(n2)2.654321A.543612B.453126C.346512D.2341563.412344212A.8B.9C.10D.114.FBmBnFA.m-nB.m-n-1C.n+1D.m+n5.102510A.9B.11C.15D.6.A.B.C.D.7.710A.73B.234C.235D.2368.A.100,80,90,60,120,110,130B.100,120,110,130,80,60,90C.100,60,80,90,120,110,130D.100,80,60,90,120,130,1109.8447251521184472515212154725842131521258447415212547842A.B.C.D.10.A.B.C.D.1151.2.Pdatanext3.4.5.n6.A7BAB7.203018..ABD.GCE.H..F..9.n10.n11.12.n13.514.1101.2.3.4.5.36.ee7.8.9.10.301.42.A6ABCDEFABCDEF3.EICBGAHDFCEIFGBADH64.ACACBACDAACDBAACADAAABCD65.{371120457790}1099ASL46.{341762933118037}45201()StatusCreateBiTree(BiTree&T){charch;0100101000110001010010011100000111004read(ch);if(ch=='')T=NULL;else{T=(BiTree)malloc(sizeof(BiTNode));(1);CreateBiTree(T-lchild);(2);}returnOK;}2LieStatusListInsert(SqList&L,inti,ElemTypee){if(i1||iL.length+1)returnERROR;//for(j=L.length;ji;j--)(3);L.elem[i-1]=e;//e(4);returnOK;}//ListInsert_Sq151.i201120121101-5DBBBB6-10ACCDB1151.2.FIFOLIFO3.Q.rear==Q.front54.75.86.O(n2)7.8.n(n-1)9.n-110.1101.2.3.4.5.6.7.8.9.10.301.(1)i2i-1(i1)(2)k2k-1k1(3)n0n22n0=n2+1(4)nlog2n+1(5)n1nii=1i/22in2i2i+1n2i+15442.abefdc333.(1)T-next-next=P-next;(2)Q=T;cdfeba6While(Q-!=P){Q=Q-next;}Q-next=P-next;free(P);124.5.{113777204590}113777904520776.{341762933118037}d=5111762933348037d=3111762933348037d=16111729333437805201.(1)visit(T-data);printf(T-data);(2)PreOrderTraverse(T-rchild);2.(1)returnmid;(2)high=mid-1;15//LieOKERRORStatusListDelete(SqList&L,inti,ElemType&e){if(i1||iL.length)returnERROR;ABCDEF7e=L.elem[i-1];for(intj=i+1;j=L.length;j++)L.elem[j-2]=L.elem[j-1];L.length--;returnOK;}
本文标题:《数据结构》期末考试题及答案
链接地址:https://www.777doc.com/doc-2403467 .html