retagged by
4,264 views
25 votes
25 votes

The following sequence of operations is performed on a stack:

$PUSH  (10), PUSH (20), POP, PUSH (10), PUSH (20), POP, POP, POP, PUSH (20), POP$

The sequence of values popped out is

  1. $20,10,20,10,20$
  2. $20,20,10,10,20$
  3. $10,20,20,10,20$
  4. $20,20,10,20,10$
retagged by

5 Answers

Answer:

Related questions

21 votes
21 votes
1 answer
1
25 votes
25 votes
3 answers
3
Kathleen asked Sep 12, 2014
4,257 views
Consider the binary tree in the figure below:What structure is represented by the binary tree?
20 votes
20 votes
5 answers
4
Kathleen asked Sep 12, 2014
5,382 views
If the binary tree in figure is traversed in inorder, then the order in which the nodes will be visited is ______