單項(xiàng)選擇題判斷棧滿(mǎn)(元素個(gè)數(shù)最多n個(gè))的條件是()。

A.top==0
B.top!=0
C.top=-1
D.top==n-1


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題判斷一個(gè)順序隊(duì)列(最多元素為m)為空的條件是()。

A.rear==m-1
B.front==rear+1
C.front==rear

2.單項(xiàng)選擇題在一個(gè)棧頂指針為top的鏈棧中,將一個(gè)p指針?biāo)傅慕Y(jié)點(diǎn)入棧,應(yīng)執(zhí)行()。

A. p->next=top;top=p;
B. top->next=p;
C. p->next=top->next;top=top->next;
D. p->next=top->next;top->next=p;