單項(xiàng)選擇題向一個順序棧S(棧頂指針為top)中插入元素x時(shí),首先要()。

A.S->stack[S->top]=x
B.S->top++
C.S->top--
D.x=S->stack[S->top]


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題

設(shè)有程序段
i=1;
while (i<=n)
i=i*2;
上面程序段的時(shí)間復(fù)雜度為()。  

A、O(n)
B、O(log n)
C、O( nlog n)
D、O(n2)