版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
ONE.Single-Analgorithm(算法)isreferredto A.acalculatingB.asortingC.asequentialsetofinstructionstosolveaD.asearchingTheLinkedListisdesignedforconveniently )data Inthefourchoices, )isnotthepropertiesof Assumeasequencelistas1,2,3,4,5,6ispushedinastack(栈),animpossibleoutputsequencelistis( A.2,4,3,5,1 B.3,2,5,6,4,5,4,6,2 D.4,5,3,6,25.Aqueue(队列)isastructurethatfollowstheprincipleof( D.RandomInandRemovingthedataitematindexiinanarraywithnitems,( )itemsneedtobeshiftedleftoneposition. ThereisanalgorithmwithinsertinganitemtoaorderedSeqList(顺序链表)andstillkeetheSeqListordered.Thecomputationalefficiencyofthisinsertingalgorithmis TheaddresseswhichstoreLinkedList mustbesequential B.mustbepartlysequentialC.mustbenosequential D.canbesequentialordiscontinuousAccordingtothedefinitionofBinaryTree,therewillbe( )differentBinaryTreeswith3nodes. 10.ABinaryTreewillhave )nodesonitsleveliat Inthefollowingsortingalgorithm, isanunstable(不稳定)theinsertionsort(插入排序) B.thebubblesort(气泡法排序)C.quicksort(快速排序) Assumethatthereisanorderedlistconsistingof100dataitems,usingbinarysearch(二分法查找)tofindaspecialitem,theumcomparisonsis( TheresultfromscanningaBinarySearchTree(二叉排序树)ininordertraversalisin )order.descendingorascending D.outofToconnectnverticesinanundirectedgraph,itneeds )edgesat Inanundirectedgraphwithnvertexes,theumedgesis Theoutputfromscanningaminimumheap(小顶堆)withleveltraversal mustbeanascendingmustbedescendingmusthaveaminimumitemattheheadmusthaveaminimumitemattherearWhenarecursivealgorithm(递归算法)istransformedintoanorecursivealgorithm,astructure( )isgenerallyused. D.BinaryInthefollowingdatastructure, )isnon-linearA.Binary 19.Acircularqueue(循环队列)isemptyif( A.(rear+1)%Maxsize==front B.front==rearC.rear+1== D.(rear-1)%Maxsize==Thedifferencebetweenstaticsortingtable(静态查找表)anddynamicsortingtable(动态查找表)is( thedifferenceinlogicalthedifferenceinstoragethedifferenceofdatainsertionanddeletiononlycanbedoneindynamicsortingTWO.Blankfilling1.Aconnectedgraph 【1 Inacompletebinarythesequencenumberofnodei’sparent(ifexist)is thesequencenumberofnodei’sleftchild(ifexist)is thesequencenumberofnodei’srightchild(ifexist) 【4【5】isthefastestknownsortingalgorithmin4.Afullbinarytreeofagivenheighth(h>=1)has【6】AnundirectedgraphGhasNvertices.ThenumberofedgesofaMST(最小生成树)ofthisgraphis Commonlyusedgraphsearchmethods 【8 【9 Completethecommonqueueoperations. Status //capacityofthequeue //pointtoanarraywhichstoreselementsofthequeue *base; front //front rear //rear}SqQueue InitQueue_Sq( &Q{Q.base=(int*)malloc(MAXSIZE*sizeof(int));if(!Q.base) exit(0);Q.front=Q.rear=0; OK;}StatusEnQueue_Sq( if 【10 ERROR&Q,e)//IsthequeueQ.base[Q.rear]=e【11 OK}StatusDeQueue_Sq( &Q,int&e{if(Q.rear==Q.front) ERRORe=Q.base[Q.front]【12 OK}THREE.AnswerTrueorFalseforeachofthefollowing )1.TheMinimumSpanningTreeofthegraphisalways )2.Intreestructure,thereisexactlyonepathfromtheroottoeach )3.ForeverynodeinanAVLtree(平衡二叉树),theheightoftheleftandrightsub-treescandifferbyatmost1. )4.MaxHeap(大顶堆)canlocatethecurrentuminO(1) )5.Foranynon-emptytree,ifnisthenumberofnodesandeisthenumbersofedgesthenn=e+1. )6.Ifabinarysearchtreehaslileavesathighti(i>=1),thenli )7.Thetopologicalsortedorder(拓扑排序)ofnodesinagraph(ifitexists)isalways )8.Astackisalinearlistinwhichalladditionsarerestrictedtooneend,calledtheAstackisalsocalledaFIFO 9.Thearray2317146131015712isaheap堆 )10WecanuseTimeComplexityandSpaceComplexitytoevaluatetheefficiencyofanFOUR.Assumethatweareusingthehashingfunctionhash(key)=keymod11andthefollowingsequenceofkeyscreateahashtable:12,44,13,88,23,94,11,39,20,16,5.theresultinghashtable:Uselinearprobing线性探测)withanincrementofFIVE.YouaregivenanundirectedGiveadjacencymatrix(邻接矩阵representationofthisConstructaminimumspanningtree,usingtheKruskalalgorithm(算法).Drawtheprogressofcreation.SIX.SupposetheinordertraversalsequencesofabinarytreeisHDBIEAFJCGK,thepostordertraversalsequencesisHDIEBJFKGCA.Pleaseconstructthebinarytree,showthefinalresultandwriteoutthepreordertraversalsequenceofthebinarytree.SEVEN.Firststep,showtheresultofinserting40,22,53,99,37,13,61,80,70,24intoaninitiallyemptybinarysearchtree.Thenshowtheresultofdeletingtheroot.EIGHT.Thefrequencyofthesymbols{a,b,c,d,e,f}is{0.07,0.09,0.12,0.22,0.27}.ConstructtheHuffmantreeandgivetheHuffmancodeofthesymbols{a,b,c,d,e,f}.NINE.GettheprogramrunningOperationof//SupposeStackandcorrespondingfunctionsalreadybecorrecteddefinedvoidmain(){ S x,y;InitStack(S);x=’c’ y=’t’Push(S,x) Push(S,’u’) Push(S,y)Pop(S,x) Push(S,’r’) Push(S,x)Push(S,y) Pop(S,y) Push(S,’s’)while(!StackEmpty(S)) Pop(S,y); printf(y); printf(x);}Operationofabinarytree. LeftChild(i) (2*(i)+1)voidfun1(int A[],int i,int n) Child; Tmp;for(Tmp=A[i];LeftChild(i)<n;i=Child Child=LeftChild(i)if(Child!=n-1&&A[Child+1]>A[Child]) Child++;if(Tmp<A[Child])A[i]=A[Child]; break}A[i]=Tmp}voidfun(intA[],intn i,tempfor(i=n/2;i>=0;i--fun1(A,i,n)for(i=n-1;i>0;i-- temp=A[0],A[0]=A[i],A[i]=temp;fun1(A,0,i);}}#defineN15voidmain() a[N]={5,9,3,2,99,8,7,1,77,54,23,12,88,-6,-10} i;fun(a,N);for(i=0;i<N;i++)printf("%d",a[i]);}TEN.Programming(Allmethodshavebeende
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 低温烘干羽绒加工生产线可行性研究报告
- 智慧城市智慧家居系统设计与安装合同2026
- 企业后勤年终工作总结
- 代加工厂建设可行性研究报告
- 人造石墨混捏成型自动化生产线项目可行性研究报告
- 人行天桥建设项目可行性研究报告
- 语文-陕西省咸阳市实验中学2026-2027学年高一上学期期中
- 请详细阐述细菌性阴道炎的护理诊断及相应的护理措施
- 宫颈上皮内瘤变(CIN)术后的护理查房
- 卵巢早衰的预防及护理
- 储能电站电池热失控火灾应急演练脚本
- 2026年人教版初中九年级数学上册函数综合应用专题卷含答案
- 黑龙江省2024-2025学年高二英语学业水平考试试题含解析
- T∕HNCJ 0003-2026 城镇供水管网分区计量漏损控制技术标准
- 护理论文范文10篇
- TSG 92-2026 承压类特种设备安全附件安全技术规程
- 小班骑行故事案例分析
- 监控摄像头安装专项施工方案
- 十五五规划纲要解读:农膜回收利用提升
- 趣味儿童流感知识闯关
- 雨课堂学堂在线学堂云《深度学习基础(哈工 )》单元测试考核答案
评论
0/150
提交评论