Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Data Structures | Queue | Question 3

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

How many stacks are needed to implement a queue. Consider the situation where no other data structure like arrays, linked list is available to you.

(A)

1

(B)

2

(C)

3

(D)

4



Answer: (B)

Explanation:

A queue can be implemented using two stacks.


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Last Updated : 01 Feb, 2013
Like Article
Save Article
Similar Reads
Related Tutorials