计算机应用基础数据结构部分试题及答案 2.docx

上传人:b****4 文档编号:13906167 上传时间:2023-06-19 格式:DOCX 页数:20 大小:23.92KB
下载 相关 举报
计算机应用基础数据结构部分试题及答案 2.docx_第1页
第1页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第2页
第2页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第3页
第3页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第4页
第4页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第5页
第5页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第6页
第6页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第7页
第7页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第8页
第8页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第9页
第9页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第10页
第10页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第11页
第11页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第12页
第12页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第13页
第13页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第14页
第14页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第15页
第15页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第16页
第16页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第17页
第17页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第18页
第18页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第19页
第19页 / 共20页
计算机应用基础数据结构部分试题及答案 2.docx_第20页
第20页 / 共20页
亲,该文档总共20页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

计算机应用基础数据结构部分试题及答案 2.docx

《计算机应用基础数据结构部分试题及答案 2.docx》由会员分享,可在线阅读,更多相关《计算机应用基础数据结构部分试题及答案 2.docx(20页珍藏版)》请在冰点文库上搜索。

计算机应用基础数据结构部分试题及答案 2.docx

计算机应用基础数据结构部分试题及答案2

计算机应用基础数据结构部分试题及答案(Computerapplicationbasicdatastructurepartquestionsandanswers)

Somethings,knowingthatiswrong,butalsotoadhereto,becausenotreconciled;somepeople,knowingthatloveisalsotogiveup,becausethereisnoend;sometimes,knowingthatthereisnoroad,butstillforward,becauseusedto.

Computerapplicationbasicdatastructurepartquestionsandanswers

1.choicequestions:

1.thecomplexityofthetimecomplexityofthefollowingprogramsegmentsis(

For(i=1;i<=n;i++)

For(j=1;j<=i;j++)

For(k=1;k<=j;k++)

X=x+1;

A.,O

(1),B.O(n),C.,O(N2),D.O(N3)

2.,inthedatastructure,thedatastructurecanbelogicallydividedinto()

A.dynamicstructureandstaticstructure,B.compactstructureandnoncompactstructure

C.linearstructureandnonlinearstructure,D.internalstructureandexternalstructure

3.datastructuresincludefourbasictypes:

set,linear,tree,andgraphstructures.

A.storagestructure,B.logicstructure,C.basicoperation,D.algorithmdescription

4.data()includesearch,insert,delete,updateandsort,etc..

A.storagestructure,B.logicstructure,C.basicoperation,D.algorithmdescription

5.thestoragestructureofdataincludesfourbasictypesofsequence,link,hash,and().

A.linearB.array,C.set,D.index

6.,thefollowing()isthebesttimecomplexity,i.e.,theshortestexecutiontime.

A.,O(n),B.O(logn),C.,O(nlogn),D.O(N2)

7.thecomplexityofthetimecomplexityofthefollowingprogramsegmentis()

For(inti=0;i

For(intj=0;j

A[i][j]=i*j;

A.,O(M2),B.O(N2),C.,O(m*n),D.O(m+n)

8.()isnotthebasicfeatureofthealgorithm.

A.correctness,B.lengthislimited,C.withinthespecifiedtimetocompleteD.certainty

9.theinputsequenceofastackis1,2,3,4,5,andthefollowingsequenceistheoutputsequenceofthestack.

A.31245,B.41325,C.23415,D.14253

10.,intheNnodewithtwonodes,thenumberofchainsisempty,andthenumberoffieldsis().

A.,n-1,B.,2N-1,C.,n+1,D.,2n+1

1-5,D,C,B,C,D,,B,C,C,C,C

11.knowncompletetwoforktreehas30nodes,thenthewholetwoforktreehas()1degreesofnode.

A.0,B.1,C.2,D.arenotsure

12.depthtwoKfulltree,atleast()node.

A.,2k-1,B.,2k-2,C.,2k-1,D.,2k-2

13.depthtwoKfulltree,atmost()nodes.

A.,2k-1,B.,2k-2,C.,2k-1,D.,2k-2

14.directinsertionsortofasetofrecords(54,38,96,23,15,60,72,45,83,60).Whenseventhrecordsareinsertedintoanorderedtable,comparisons(Times)areneededtofindtheinsertionposition.

A.1,B.2,C.3,D.4

15.bisearchorderedtable(6,15,30,37,65,68,70,72,89,99,37)ifrequiredinordertofindelements,andtheelementsinthetable(compare).

A.65,15,37,B.68,30,37,C.65,15,30,D.65,,15,30,37

16.alengthlineartablestorageorderoftheN,totheIelements(1In+1)toinsertanewelement,needfrombehindthefrontturnaftertheshift(elements).

A.,n-i,B.,n-i+1,C.,n-i-1,D.,I

17.,asshowninthe4twoforktree,()isnotexactlytwoforktree.

(A)(B)(C)(D);

18.forthelengthofanorderedliststoredinorderof18,iftheuseofbinarysearch,tofindthefifteenthelementsofthesearchlength().

A.3B.4C.

5D.6

19.,thereare10000unorderedelements,andyouwanttopickoutthefirst10largestelementsatthefastestspeed.You'dbetterchoose()therankingmethod.

A.heapsort,B.quicksort,C.bubblesort,D.insertsort

20.computeralgorithmsreferto().

A.computingmethod,B.sortingmethod,C.,solvetheproblemoforderedsequence,D.schedulingmethod

11-15,B,C,A,C,D,,B,C,A,B,A

21.astackofsequences1,2,3,4,thenitsunlikelyoutputsequenceis().

A.1,2,3,4,B.,4,3,2,1,C.,1,3,4,2,D.4,,,1,2,3

22.foranytreewithtwobranches,ifitsjunctionnumberisN0,andtheknotnumberof2isN2,thenN0=().

A.,N2-1,B.,N2+1,C.,N2,D.,N2-2

The23.lineartableis()

A.afinitesequence,whichcanbeemptyB.,afinitesequence,cannotbenull

C.aninfinitesequencecanbeaninfinitesequenceofemptyD.,andcannotbenull

24.inalineartableoflengthN,thetotalnumberofelementsandmovingelementsneededtobecomparedis(x)whentheelementisdeleted

A.(n+1),/2,B.n/2,C.,N,D.n+1

25.thetimecomplexityofinsertinganelementattheendofasequentialtableistheorderofmagnitude

A.,O(n),B.O

(1),C.,O(N2),D.O(logn)

26.setasinglechaintablepointerPpointstothenodeAI,ifyouwanttodeletetheAIafterthenode(ifthereis),youneedtomodifythepointeroperationfor().

A.,p->next=,p->next->next,B.,p=p->next,C.,p=p->next->next,D.,next=p

27.setasingletable,pointerPpointstothenodeAI,pointerfpointtothenewnodetoinsertx,thenwhenxinsertedinthelistoftwodataelementsbetweenAIandai+1,aslongasfirstmodify(),thenmodify()can.

A.,p->next=,F,B.,p->next=,p->next->next

C.,p->next=f->next,D.,f->next=,p->next

E.f->next=nullF.f->next=p

28.setasingletable,pointerP,pointingtothenodeAI,pointerfpointtothenewnodetoinsertx,theninthelistofthelastnodean,wheninserted,aslongasthefirstmodification(),youcanmodify().

A.,f->next=,P,B.,f->next=,p->next

C.,p->next=f,D.,p->next=,f->next

E.f=null

29.inasinglelinkedlist,ifyouwanttoinsertanewnodeafterthenodepointedtobyP,youneedtomodifythevaluesofthepointerfieldsoneafteranother.

A.1,B.2,C.3,D.4

30.inasinglelinkedlist,iftheinsertionofanewnodebeforethenodepointedtobyP,thetimecomplexityofthisalgorithmistheorderofmagnitude

A.,O(n),B.O(n/2),C.,O

(1),D.O(n1/2)

21-25,D,B,A,C,B,,A(D.A)(B.C),B,A

31.,donottaketheleadofthesinglelinkedlistLisempty,thedecisionconditionis().

A.,L==NULL,B.,L->next==NULL

C.,L->next==L,D.,L=NULL

32.,theleadinglinkofthesinglelinkedlist,Lisempty,thedecisionconditionis().

A.,L==NULL,B.,L->next==NULL

C.,L->next==L,D.,L=NULL

33.inabidirectionallinkedlistwithheadnodes,ifyouwanttoinsertanewnodebeforethenodepointedtobyP,youneedtomodifythevaluesofthepointerfieldsoneafteranother.

A.2,B.3,C.4,D.6

34.inabidirectionallinkedlistwithaheadnode,ifyouwanttoinsertanodepointingtotheQpointerafterthepointPispointingto,youneedtoassignthevalueofq->nextto()

A.p->priorB.p->next

C.

P->next->NEXTD.P->->priorPrior

35.对一个具有n个元素的线性表,建立其单链表的时间复杂度为()

Too(n)B.O.C.

(1)o(N2)region(logn)

36.线性表采用链式存储时,其地址()

To必须是连续的.

一定是不连续的B.

有些事,明知是错的,也要去坚持,因为不甘心;有些人,明知是爱的,也要去放弃,因为没结局;有时候,明知没路了,却还在前行,因为习惯了.

C.部分地址必须是连续的

连续与否均可以D.

37.假定利用数组a[n]顺序存储一个栈,用top表示栈顶指针,Top==-1表示栈空,并已知栈未满,当元素x进栈时所执行的操作为()

A.--[TOP]=xB.[TOP]=[-XC++Top.[TOP]=xD++]=x

38.若已知一个栈的入栈序列是1,2,3...N,其输出序列为p1,P2,P3,.....若p1=PN,N,则pi为()

A.Ib.n-iC.N-I+1d.不确定

39.判定一个栈s(最多元素为m0)为空的条件是()

S.Top!

Top==00=B.S.C.S.Top!

D=M0sTop==M0

40.判定一个栈s(最多元素为m0)为满的条件是()

Tostop!

Top==00=B.S.C.S.Top!

D=M0-1S-1Top==M0

31-3536-40BCBaDCCBd

41.一个队列的入队序列是1,2,3,4,则队列的输出序列是()

A.4,3,2,1BCD.3,2,4,11,4,3,21,2,3,4.

42.从一个顺序循环队列中删除元素时,首先需要()

To后移队首指针.前移队首指针B.

C.取出队首指针所指位置上的元素D.取出队尾指针所指位置上的元素

43.假定一个顺序循环队列的队首和队尾指针分别用front和rear表示,则判断队列空的条件为()

A.front+1+1====b.rearRearFrontFront=DC=0.==rearFront

44.假定一个顺序循环队列存储于数组a[n]中,其队首和队尾指针分别用front和rear表示,则判断队列满的条件为()

A.(rear)-1%(n==frontB.Rear+front%n==1)

C.(Front)-1%(n==rearD.(Front+1)%(n==rear

45.树中所有结点的度等于所有结点数加()

A.0D.2.C.1

46.在一棵树中,每个结点最多有个前驱结点().

A.0B.1C.2d.任意多个

47.在一棵度为3的树中,度为3的结点数为2个,度为2的结点数为1个度为1的结点点数为2个则度为0的结点数为个(,,).

A.3.B.4C.5D.6

48.在一棵二叉树上第5层的结点数最多为()

A.16B.15C.8D.32

49.在一棵具有n个结点的二叉树的第i层上,最多具有个结点().

A.2i2I+1b.C.2ID2n-1.

50.一颗具有35个结点的完全二叉树的深度为()

A.6aD.8B.7

41-45BBDBC46-50cabd

51.在一棵完全二叉树中,若编号为i的结点存在右孩子,则右孩子结点的编号为()

A.2ib.2i-1c.2id.2i+1+2

52.设高度为h的二叉树上只有度为0和度为2的结点,则此类二叉树中所包含的结点数至少为()

A.2hb.2h-1c.2hD.H+1+1

53.按照二叉树的定义,

Atwoforktreewith3nodes;has()astate.

A.5B.4C.3D.30

54.iftheprobabilityoffindingeachelementisequal,theaveragesearchlengthofanyelementisfoundontheordertableoflengthn

A.n,B.n+1,C.(n-1),/2,D.(n+1)/2

55.,thesequentialsearchmethodissuitableforstoringlineartableswith(linear)structure.

A.hashstoresB.,sequentialstorage,orlinkstorage

C.compressedstorage,D.indexstorage

56.forthesequentialstorageordertable(5,12,20,26,37,42,46,50,64),iftheuseofbinarysearch,findthesearchlength(element26)

A.2B.3C.4D.5

57.onthelinearscalebisearch,lineartable(must)

A.isstoredsequentially

B.isstoredbylink

C.isstoredsequentially,andnodesaresortedinkeywordorder

D.isstoredbylinking,andnodesaresortedinkeywordorder

58.usingabinarysearchmethodtofindthelengthofalinearlistisn,theaveragelengthofeachelement(for)

A.,O(N2),B.,O(nlogn),C.,O(n),D.,O(logn)

59.intheprocessofdirectinsertionofnelements,youneedtogothrough().

A,.N,B.n+1,C.n-1,D.2n

60.directinsertionofnelements,sortingtimecomplexityis()

A.,O

(1),B.,O(N2),C.,O(n),D.,O(nlog2n)

51-55,C,B,A,D,B,,C,B,C,D,C

61.intheprocessofquicksortingofnelements,itisbesttodo()atrip.

A.,N,B.,n/2,C.,logn,D.,2n

62.intheprocessofbubblingnelements,youneedatleast()tocomplete.

A.1,B.,N,C.,n-1,D.,n/2

63.,intheprocessofquicksortingofnelements,theaverag

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 经管营销 > 经济市场

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2