Consider
the following operations performed on a stack of size 5 : Push ();
Pop() ; Push(); Push(); Pop(); Push(); Pop();Pop(); Push () Which
of the following statements is correct? ()
A: Underflow
occurs
B: Stack
operations are performed smoothly
C: Overflow
occurs
D: None
of the above
the following operations performed on a stack of size 5 : Push ();
Pop() ; Push(); Push(); Pop(); Push(); Pop();Pop(); Push () Which
of the following statements is correct? ()
A: Underflow
occurs
B: Stack
operations are performed smoothly
C: Overflow
occurs
D: None
of the above
B
举一反三
- Which<br/>of the following is true about linked list implementation of stack?<br/>() A: In<br/>push operation, if new nodes are inserted at the beginning of linked<br/>list, then in pop operation, nodes must be removed from end. B: In<br/>push operation, if new nodes are inserted at the end, then in pop<br/>operation, nodes must be removed from the beginning. C: Both<br/>of the above D: None<br/>of the above
- 执行以下指令后,(SP) =____,(A)=____,(B)=____。[br][/br]MOV SP,#70H[br][/br]MOV A,#60H[br][/br]MOV B,#0F8H[br][/br]PUSH ACC [br][/br]PUSH B[br][/br]POP ACC[br][/br]POP B
- 设有一个空栈,现有输入序列1,2,3,4,5,经过push,push,pop,push,pop,push,push,输出序列是(<br/>)。 A: 2,3 B: 3,4 C: 4,5 D: 2,4
- 输入序列为abc,若输出序列为bca,经过的栈操作为( ) A: push,pop,push,pop,push,pop B: push,push,push,pop,pop,pop C: push,push,pop,push,pop,pop D: push,pop,push,push,pop,pop
- 输入序列为ABC,可以变为CBA时,经过的栈操作为: push,pop,push,pop,push,pop|push,pop,push,push,pop,pop|push,push,pop,pop,push,pop|push,push,push,pop,pop,pop
内容
- 0
设有一空栈,现有输入序列(1,2,3,4,5),经过push, push, pop, push, pop, push, push, pop, pop, pop后,输出序列是
- 1
下列哪个方法是返回新数组的长度()。 A: concat(<br/>) B: pop(<br/>) C: push(<br/>) D: shift(<br/>)
- 2
二叉树的中序遍历也可以循环地完成。给定循环中堆栈的操作序列如下()(其中push为入栈,pop为出栈):push(1),push(2),push(3),pop(),push(4),pop(),pop(),push(5),pop(),pop(),push(6),pop()
- 3
若写为Stack::Stack() : top(0) {} 时,isEmpty和isFull将修改为top==0和top==SIZE。此时:push,pop,peek中top的使用方法为push:list[___] = item;pop: return list[___];peek: return list[top-1];(请使用++,--,不要输入空格)<br/>______
- 4
下面能够完成R10和R11寄存器内容交换的是( ) A: PUSH {R10,R11}<br/>POP{R10,R11} B: PUSH {R10,R11}<br/>POP{R11,R10} C: MOV R10,R11<br/>MOV R11,R10 D: LDR R11,[R10]<br/>STR R10,[R11]