What Is Queue? (Data Structure)

in #data6 years ago


QUEUE:-
A Queue is FIFO(First in First Out) abstract data type and linear data structure.A Queue can have any abstract data type as an element,but is characterized by two fundamental operation, called Enqueue and Dequeue has two pointers Front and rear.
The Enqueue operation adds a new item to the front of queue or initialize the queue if it is empty.If the Queue is full and does not contain enough space to accept the given item.then the queue is consider to be in an overflow state.
The Dequeue operation removes an from front of the queue.A dequeue either revels previously concealed items or results in an array but if the queue is empty then it goes into underflow state(It Means no item present in queue to be removed)

WHILE THE DEALING WITH THE CIRCULAR QUEUE WE WILL USE THE FOLLOWING ASSUMPTIONS:-

1.First will always be pointing to the first element of the queue.

2.Each time New element inserted the queue the value of rear increase by one.i.e, rear=rear+1.

3.Each time when an existing element is deleted from the queue,the value of front is incremented by one.i.e, front = front +1.
4.Front is the intial or first location of the queue where rear is th e last location of the queue.(Entry Location).

Sort:  

Congratulations @pranab-sarkar! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Do not miss the last post from @steemitboard:

Carnival Challenge - Collect badge and win 5 STEEM
Vote for @Steemitboard as a witness and get one more award and increased upvotes!

Congratulations @pranab-sarkar! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

Use your witness votes and get the Community Badge
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.23
TRX 0.21
JST 0.036
BTC 98064.32
ETH 3430.60
USDT 1.00
SBD 3.23