资源描述:
《四川大学2013数据结构与算法 (a 闭)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、311076040数据结构与算法(A闭)2013-2014-1一、单项选择题(本大题共15小题,每小题2分,共30分)提示:在每小题列出的四个备选项中只有一个是符合题目要求的,请将其代码填写在下表中。错选、多选或未选均无分。1.Giventheinputorderofastackis123…n,ifthefirstelementofoutputisn,thentheithelement(1<=i<=n)oftheoutputis().A.uncertainB.n-i+1C.iD.n-i2.IftheMaxSizeofaCircularQueuei
2、snandthereisalwaysaspacenotuse,frontpointstothepreviousofthefrontelementinthequeue,andrearpointstotherearelementinthequeue.ThenumberofitemsintheQueuecanbeexpressedby().A.(rear-front+n)%nB.rear-front+1C.rear-front-1D.rear-front3.Asortingalgorithmisstableifit().A.Worksforallinp
3、uts.B.Doesn’tchangetherelativeorderingofrecordswithidenticalkeyvalues.C.Alwayssortsinthesameamountoftimeforagiveninputsize.D.Alwayssortsinthesameamountofspaceforagiveninputsize.4.Inthefollowingsortingmethods,thetimecomplexityof()isirrelativewiththeinitialorderofsequence.A.Ins
4、ertionsortB.BubblesortC.QuicksortD.Selectionsort5.Accordingtotheaveragecase,()isthequickestsortingalgorithmifthesizeofsequenceisverybig.A.BubblesortB.ShellsortC.mergesortD.Quicksort6.Inthefollowingsequence,()isnotaheap?A.100,85,98,77,80,60,82,40,20,10,66B.100,98,85,82,80,77,6
5、6,60,40,20,10C.10,20,40,60,66,77,80,82,85,98,100D.100,85,40,77,80,60,66,98,82,10,207.ThedataStructurescanbedividedinto()accordingtotheirLogicalformA.Dynamicstructures,StaticstructuresB.Array-basedstructures,LinkedstructuresC.Simplestructures,ComplexstructuresD.Linerstructures
6、andNon-linerstructures8.Inthefollowingdatastructures,()islinerstructure.A.DAGB.BSTC.Array-basedlistD.Generaltree9.Thenodenumberofanon-EmptyFullBinaryTreemustbe().A.anoddnumberB.anevennumberC.anypositivenumberD.anyinteger10.Whensortingthesequence{8,9,7,15,20,-1,4},themiddleres
7、ultafteronepassis:{4,-1,7,8,20,15,9};Thenthesortmethodusedis().A.InsertionSortB.HeapsortC.QuicksortD.BubbleSort11.ThecorrecttraversaltouseonaBSTtovisitthenodesinsortedorderis().A.PreordertraversalB.InordertraversalC.PostordertraversalD.Broadwisetraversal12.Huffmancodingprovid
8、estheoptimalcodingwhen().A.ThemessagesareinEnglish1/4311076040数据结构与算