Questions tagged [queues]

A queue is a First In First Out (FIFO) data structure. Popular uses of queues include buffers and breadth-first graph traversal.

Filter by
Sorted by
Tagged with
5 votes
3 answers

Assigning a unique representation to equivalent circular queues

First, a few vague definitions: Circular queues (or circular buffers) are data structures like normal queues but with their ends connected together (forming a "circle"). wikipedia Let's say that 2 ...
A. Sallai's user avatar
  • 243
1 vote
3 answers

Using Queues for a Stack and Stacks for a Queue

I was asked a question on how to use a pair of Queues to create a Stack and how to use a pair of Stacks to create a Queue. Any thoughts on how I would do this? Right now I don't even know where to ...
Beca's user avatar
  • 11
-1 votes
1 answer

Algorithmic Complexity of Enqueue and Dequeue of a Special Queue

The Canteen Queue Problem There is a common canteen for K hostels. Each hostel (co-ed) has some $N_1,N_2,...,N_K$ students. These students line up to pick up their trays in the common canteen, in a ...
Kunind Sahu's user avatar