416 views
1 votes
1 votes

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

Please log in or register to answer this question.

Answer:

Related questions

0 votes
0 votes
1 answer
2
Bikram asked Nov 26, 2016
1,673 views
Three algorithms do the same task. Algorithm One is $O(N)$ and Algorithm Two is $O(\log N)$ and Algorithm Three is $O(N1/2)$. Which algorithm should execute the fastest f...
1 votes
1 votes
3 answers
3
0 votes
0 votes
0 answers
4