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