Applications of Queue Data Structure

Queue is used when things don’t have to be processed immediatly, but have to be processed in First In First Out order like Breadth First Search. This property of Queue makes it also useful in following kind of scenarios.

1) When a resource is shared among multiple consumers. Examples include CPU scheduling, Disk Scheduling.
2) When data is transferred asynchronously (data not necessarily received at same rate as sent) between two processes. Examples include IO Buffers, pipes, file IO, etc.

See this for more detailed applications of Queue and Stack.


Company Wise Coding Practice    Topic Wise Coding Practice

Writing code in comment? Please use, generate link and share the link here.

  • tejal chaskar

    void qinsert(node **front,node **rear)
    node *newnode; /* New node to be inserted */
    printf(“\nEnter the character to push\n”);
    if(*front==NULL && *rear==NULL)

  • Himanshu Aggarwal

    Do we also have an article on the application of dequeue structure/template class as well? I could not find any on geeksforgeeks.


    • GeeksforGeeks

      @Himanshu Aggarwal

      Currenly we do not have a post on the application of dequeue structure/template class. We will be including this as part of the data structure/algo application series.