Recent Post

QUEUE

  • Queue is a linear data structure in which data can be added to one end retrieved from the other
  • First in first out data structure
  • It is an ordered list in which all insertion take place at one end called the rear end.
  • All deletion take place at the other end called the front end.
  • Front end is denoted by "f" and rear end is denoted by "r".
  • Element may be inserted at any time , but only the elements which has been in the queue the longest may be removed first.

Properties of Queue:-

1) Queue has two ends called the front and rear end.
2) Addition of new item can only be done at rear end.
3) Deletion of new item  is done only from front end.
4) The item which is added first will be deleted first.
5) Queue is also called FIFO(first in first out) data structure.
6) Only one element can be added at one time.
7) Only one element can be deleted at one time.
8) No element other than front and rear are accessible. 

Operation On Queue:-

i) Enqueue-To insert an element in a queue.
ii) Dequeue-To delete an element from the queue.

No comments