recategorized by
881 views
1 votes
1 votes

The minimum number of stacks needed to implement a queue is

  1. $3$
  2. $1$
  3. $2$
  4. $4$
recategorized by

1 Answer

3 votes
3 votes

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

1. insert operation...push(s1)

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

Answer:

Related questions

3 votes
3 votes
2 answers
1
gatecse asked Dec 17, 2017
1,248 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 votes
3 votes
2 answers
2
gatecse asked Dec 17, 2017
3,739 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 votes
2 votes
2 answers
3
gatecse asked Dec 17, 2017
1,263 views
A strictly binary tree with $10$ leavescannot have more than $19$ nodeshas exactly $19$ nodeshas exactly $17$ nodeshas exactly $20$ nodes
1 votes
1 votes
1 answer
4