雨课堂在线学堂《数据结构(Data Structures)》单元考核测试答案_第1页
雨课堂在线学堂《数据结构(Data Structures)》单元考核测试答案_第2页
雨课堂在线学堂《数据结构(Data Structures)》单元考核测试答案_第3页
雨课堂在线学堂《数据结构(Data Structures)》单元考核测试答案_第4页
雨课堂在线学堂《数据结构(Data Structures)》单元考核测试答案_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

目录1.Introduction2.List3.Tree4.Search5.Index1.Introduction1/2单选题(1分)1.Whichapplicationcanbedevelopedbasedonthegraphdatastructure?StudentmanagementsystemFamilyinformationsystemTransportationnetworksFiledirectory答案:C2/2单选题(1分)Whichoneisnotapartofanabstractdatastructure?DataAbstractoperationsImplementationofOperations答案:C

1

/1

单选题

(1分)AT(n)=c1*n+c2BT(n)=c1*n*n+c2CT(n)=c1*i*j+c2

答案:B1/4单选题(1分)Ωindicatesthe____boundLowerExactUpper答案:A2/4单选题(1分)Θindicatesthe______bound.LowerExactUpper答案:B

3

/4

单选题

(1分)Whichoneisslowest:A)B)C)D)

答案:B

4

/4

单选题

(1分)Oindicatesthe_______boundALowerBExactCUpper

答案:C

1

/1

单选题

(1分)DetermineΘforthefollowingcodeintheaveragecase.Assumethatallvariablesareoftypeint.AΘ(1)BΘ(n*n)CΘ(n)DΘ(n*logn)

答案:C2.List

1

/1

单选题

(1分)A4B5C8D3

答案:B1/1单选题(1分)GiventhepositionofanelementinanarraybasedList,thetimecosttogetthevalueoftheelementis_____?Θ(1)Θ(n)Θ(n*n)Θ(logn)答案:A1/1单选题(1分)Whenweinsertoneelementintoanarraybasedlist,weneedtomovetheelementsinthearray.Whichoneofthefollowingcodefragmentsiscorrecttoperformthedatamovement?for(inti=fence;i<listsize;i++)listArray[i]=listArray[i-1];for(inti=fence;i<listsize;i++)listArray[i-1]=listArray[i];for(inti=listSize;i>fence;i--)listArray[i]=listArray[i-1];for(inti=listSize;i>fence;i--)listArray[i-1]=listArray[i];答案:C1/2单选题(1分)Thetimecosttoremoveanelementfromanarraybasedlistis______inaveragecase?Θ(1)Θ(n)Θ(n*n)Θ(logn)答案:B2/2单选题(1分)Thetimecosttoinsertanelementintoanarraybasedlistis_________inaveragecase?Θ(1)Θ(n)Θ(n*n)Θ(logn)答案:B1/2判断题(1分)Comparedwitharraybasedlist,linkedlistrequiresmorememorytostoreelements.答案:√2/2判断题(1分)Theelementsinalinkedlistmustbestoredcontinuouslyinmemory.答案:×1/1单选题(1分)Givenanemptylinkedlist,thecosttoinsertnelementsinthelistis___?Θ(1)Θ(n)Θ(n*n)Θ(logn)答案:B1/1单选题(1分)Whenweremoveoneelementfromalinkedlist,____'next'pointersinthelistwillbechangedatmost?0123答案:B1/1多选题(2分)Whichoperationsoflinkedlistaremoreefficientthanarraybasedlist?insertsearchremovesetPos答案:AC1/1单选题(1分)Whichoneisnotcorrect?StackisarestrictformoflistStackhastheLIFOproperty(lastinfirstout)TheinsertionoperationofstackisperformedatthetopofthestackTheremoveoperationofstackisperformedatthebottomofthestack答案:D1/1单选题(1分)Givenaqueue{1,2,3,4,5},where1isthefrontand5istherear.Whatwillbethequeuechangedtoafterexecutingthefollowingoperations:enqueue(8),dequeue(),dequeue(),enqueue(9),dequeue(),dequeue(),dequeue(),enqueue(10),10,9,88,9,104,5,8,9,1010,9,8,4,5答案:B3.Tree1/2填空题(1分)Afullbinarytreewith11nodeshas____leaves.答案:["6"]2/2填空题(2分)Acompletebinarytreewiththeheight4has____nodesatmost,and____nodesatleast.答案:["15"]2答案:["8"]1/1填空题(1分)Inanarraybasedcompletebinarytree,theparentoftheNo.15nodeisstoredintheNo.____positionofthearray.答案:["7"]

1

/1

填空题

(2分)________

答案:["abdceghf"]2答案:["dbaghecf"]1/2判断题(1分)ABSTmustbeafullbinarytree?答案:×2/2判断题(1分)TheheightofaBSTwithnnodesisalwayslessthann?答案:×1/1判断题(1分)ThetimecosttosearchavalueinaBSTisalwaysΘ(logn)inaveragecase?答案:×1/1判断题(1分)ThetimecosttoinsertonenodeonabalancedBSTisΘ(logn)inaveragecase?答案:√1/3判断题(1分)Aheapmustbeacompletebinarytree答案:√2/3判断题(1分)Aheapmustbeafullbinarytree答案:×3/3判断题(1分)Theminimumvalueofaheapisalwaysstoredinitsrootnode.答案:×

1

/1

单选题

(1分)A)B)C)D)

答案:B4.Search1/2单选题(1分)Givenasortedarraycontainingnelements,thetimecostofbinarysearchisΘ(___)inaveragecase.n*nnlognn*logn答案:C2/2单选题(1分)ThetimecosttoinsertoneelementintoasortedarrayisΘ(___)inaveragecase.n*nnlognn*logn答案:B

1

/1

单选题

(1分)学生在文本框中输入答案:,之后系统会根据数值判断答案:是否正确。

A3B4C5D6

答案:B1

/1

单选题

(1分)A1B4C7D10

答案:D5.Index1/1单选题(1分)Thetimecosttoinsertorremoveoneelementinalinearindexis:Θ(1)Θ(n)Θ(n*n)Θ(logn)答案:B1/1单选题(1分)Afterinserttheelements(8,10,30,5,15,2,20)intoanempty2-3treeonebyone,thedepthofthenodecontaining10is_________0123答案:A1/3判断题(1分)2-3treeisalwaysbalanced?答案:√2/3判断题(1分)Thetimecosttosearchoneelementina2-3treeisΘ(logn)inaveragecase,andΘ(1)inbestcase.答案:√3/3填空题(1分

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论