Queue Data Structure

 

QUEUE DATA STRUCTURE



 

 

This diagram shows a queue data structure. It just like a queue. It has two open end. We can do three operations with stack data structure.

 

       i.          Enqueue / push

     ii.          Dequeue / pop

    iii.          Front / peek

 

 

This stack data structure also called as “ First In First Out ” structure. The element which entered first, can get out first.

 

 

E.g:

 

The better example is the Printer in an Office Network. It can receive many requests at a time. But It process the request which come first. That means first in first out.

Comments

Post a Comment

Popular posts from this blog

Insertion Sort - Time Complexity

Selection Sort - Time Complextity

Quick Sort - Time Complexity