• retagged by
803 views
1 1 vote

Consider following Scenario -

  1. The five items : P,Q,R,S and T are inserted into stack A one after other starting from T in reverse order
  2. The stack is popped three times and each element is inserted into another stack B.
  3. Then two elements are deleted from the stack B and pushed back onto the stack A.

What are the topmost elements of stack A and Stack B respectively?

  1. RP
  2. QR
  3. QP
  4. RQ

1 Answer

Answer:
Position:
Show:

Related questions

1 1 vote
0 0 answers
775
775 views
Bikram asked Nov 26, 2016
775 views
The following sequence of operation is performed on stack : push(1),push(2),pop,push(1),push(2),pop,pop,pop,push(2),pop.The sequence of popped out values are?2,1,2,2,12,1...
3 3 votes
1 answers 1 answer
1.2k
1.2k views
Bikram asked Nov 26, 2016
1,160 views
A function f is defined on stack of integer satisfies the following properties .f(empty) = 0 and f( PUSH(S,i) ) = max (f(S),0) + i for all stacks S and integer i.If a s...
2 2 votes
1 answers 1 answer
813
813 views
Bikram asked Nov 26, 2016
813 views
Elements $1,2,3,4,5$ are inserted in a stack in sequence. The elements are printed while popping them out. Which of the following is a wrong print sequence?$3 \ 5 \ 4 \ 2...
2 2 votes
2 answers 2 answers
2.8k
2.8k views
Bikram asked Nov 26, 2016
2,766 views
Meena is working in an IT company as HR manager. She has a large list of potential candidates to be recruited which are all sorted by their names. But she found that due ...