Quene (Data Structures) - Javatpoint
Quene (Data Structures) - Javatpoint
Queue
1. A queue can be defined as an ordered list which enables insert operations to be performed at one end
called REAR and delete operations to be performed at another end called FRONT.
3. For example, people waiting in line for a rail ticket form a queue.
X
Applications of Queue
ADVERTISEMENT
Due to the fact that queue performs actions on first in first out basis which is quite fair for the ordering
of actions. There are various applications of queues discussed as below.
1. Queues are widely used as waiting lists for a single shared resource like printer, disk, CPU.
2. Queues are used in asynchronous transfer of data (where data is not being transferred at the
same rate between two processes) for eg. pipes, file IO, sockets.
3. Queues are used as buffers in most of the applications like MP3 media player, CD player, etc.
4. Queue are used to maintain the play list in media players in order to add and remove the songs
from the play-list.
Complexity
ADVERTISEMENT
Data Time Complexity Space
Structure Compleity
Queue θ(n) θ(n) θ(1) θ(1) O(n) O(n) O(1) O(1) O(n)
← Prev Next →
Feedback
RxJS tutorial
Keras tutorial
Preparation
Company Questions
Trending Technologies
B.Tech / MCA