• retagged by
1,330 views

1 Answer

3 3 votes

two.....option C  ... ...

1. insert operation...push(s1)

2.delete operation ..pop(s1) -> push(s2) till get empty then pop(s2) ...

Answer:
Position:
Show:

Related questions

3 3 votes
1 1 answer
2.6k
2.6k views
gatecse asked Dec 17, 2017
2,553 views
Which of the following permutation can be obtained in the same order using a stack assuming thatinput is the sequence $5,6,7,8,9$ in that order?$7,8,9,5,6$$5,9,6,7,8$$7,8...
3 3 votes
2 answers 2 answers
1.9k
1.9k views
gatecse asked Dec 17, 2017
1,907 views
The $in$-$order$ and $pre$-$order$ traversal of a binary tree are $\text{d b e a f c g}$ and $\text{a b d e c f g}$ respectively.The $post$-$order$ traversal of a binary ...
3 3 votes
2 2 answers
4.5k
4.5k views
gatecse asked Dec 17, 2017
4,488 views
Which one of the following property is correct for a red-black tree?Every simple path from anode to a descendant leaf contains the same number of black nodes.If a node is...
2 2 votes
5 answers 5 answers
2.8k
2.8k views
gatecse asked Dec 17, 2017
2,837 views
A strictly binary tree with $10$ leavescannot have more than $19$ nodeshas exactly $19$ nodeshas exactly $17$ nodeshas exactly $20$ nodes