A.线性表采用顺序存储,必须占用一片连续的存储单元。Linearlistsusesequentialstoragewhichmustoccupyacontinuousmemoryunits.
B.线性表采用链接存储,便于插入和删除操作。Linearlistsusingthelinkedstorage,itiseasyforinsertanddeletingoperations.
C.线性表采用顺序存储,便于进行插入和删除操作。Linearlistsusingsequentialstorage,itiseasytodoinsertanddeleteoperations.
D.线性表采用链接存储,不必占用一片连续的存储单元。Linearlistsusingthelinkedstorage,donotoccupyacontinuousmemoryunits.
A.线性表在顺序存储时,查找第i个元素的时间与i的数值成正比。Whenthelinearliststoredsequentially,thetimetofindthei-thelementisproportionaltovaluewithi.
B.线性表在链式存储时,插入第i个元素的时间与i的数值成正比。Whenlinearlistsstoredinthelinkedform,thetimetoinsertthei-thelementisproportionaltovaluewithi.
C.线性表在顺序存储时,查找第i个元素的时间与i的数值无关。Whenthelinearliststoredsequentially,thetimetofindthei-thelementisregardlessofthevalueofi.
D.线性表在链式存储时,查找第i个元素的时间与i的数值无关。Whenthelinearliststoredinlinkedform,thetimetofindthei-thelementisregardlessofthevalueofi.
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;
数据结构与算法
北京大学
军职在线答案
大学网课