6填空计算运行下列程序段后m的值:Calculatethevalueofmafterrunningt
6填空计算运行下列程序段后m的值:Calculatethevalueofmafterrunningthefollowingprogramsegmentn=9;m=0;for(i=1;i<=n;i++)for(j=2*i;j<=n;j++)m=m+1;求m的值
7填空由大到小写出以下时间复杂度的序列:答案直接写标号,如:(1)(2)(3)(4)(5)(提示:系统基于字符匹配来判定答案,所以您的答案中不要出现空格)Writethefollowingtimecomplexityindescendingsequence:Writedowntheanswerlabelssuchas(1)(2)(3)(4)(5).(Hint:Thisproblemisjudgedbystringmatching,Pleasemakesureyouranswerdon’tcontainanyblanks.)
1多选下面关于线性表的叙述中,正确的是哪些?Whichofthefollowingsaboutlinearlistarecorrect?(Therearemorethanoneanswers.)Selecttheanswerthatmatches

A.线性表采用顺序存储,必须占用一片连续的存储单元。Linearlistsusesequentialstoragewhichmustoccupyacontinuousmemoryunits.

B.线性表采用链接存储,便于插入和删除操作。Linearlistsusingthelinkedstorage,itiseasyforinsertanddeletingoperations.

C.线性表采用顺序存储,便于进行插入和删除操作。Linearlistsusingsequentialstorage,itiseasytodoinsertanddeleteoperations.

D.线性表采用链接存储,不必占用一片连续的存储单元。Linearlistsusingthelinkedstorage,donotoccupyacontinuousmemoryunits.

2多选下面的叙述中正确的是:Selecttheanswerthatmatches(Therearemorethanonecorrectanswers)

A.线性表在顺序存储时,查找第i个元素的时间与i的数值成正比。Whenthelinearliststoredsequentially,thetimetofindthei-thelementisproportionaltovaluewithi.

B.线性表在链式存储时,插入第i个元素的时间与i的数值成正比。Whenlinearlistsstoredinthelinkedform,thetimetoinsertthei-thelementisproportionaltovaluewithi.

C.线性表在顺序存储时,查找第i个元素的时间与i的数值无关。Whenthelinearliststoredsequentially,thetimetofindthei-thelementisregardlessofthevalueofi.

D.线性表在链式存储时,查找第i个元素的时间与i的数值无关。Whenthelinearliststoredinlinkedform,thetimetofindthei-thelementisregardlessofthevalueofi.

3多选完成在双循环链表结点p之后插入s的操作为:Theoperationtoinsertsafterthedoublycircularlinkedlist’snodepis:(Therearemorethanoneanswers.)

A.s->next=p->next;p->next->prev=s;s->prev=p;p->next=s;

B.s->prev=p;s->next=p->next;p->next=s;p->next->prev=s;

C.p->next->prev=s;s->prev=p;s->next=p->next;p->next=s;

D.p->next->prev=s;p->next=s;s->prev=p;s->next=p->next;

数据结构与算法

北京大学

军职在线答案

大学网课

«
»

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注