Home Page class 12 @ Python

CBSE Class 12 : Data Structures

Introduction to Data Structures

CBSE Class 12 : Searching

Creation And Traversal
What is Searching?
Linear/Sequential Search
Binary Search
Insertion Of Element
Deletion Of Element

CBSE Class 12 : Sorting

What is sorting?
Bubble Sort
Selection Sort
Insertion Sort

CBSE Class 12 : Stacks

Applications of Stacks
Implementation of Stacks

CBSE Class 12 : Queues

Applications Of Queues
Implementation of Queues

Class 12 Data Structures | Queues

Applications of Queue Data Structure

Queue is an abstract data structure that follows the FIFO (First In First Out) principle where an element that is added first will be deleted first. Also, there are linear data structures as the elements are linearly arranged.

Some of the real-world applications of queues are

* Cashier line in any store.
* People in an escalator.
* Waiting on hold for tech support.
* Check-in and check out at any book store.
* Railway ticket counter
* ATM 
* In school fees counter etc.

Some of the applications of queues related to computer science are

* Data getting transferred between the IO Buffers (Input Output Buffers).
* CPU scheduling and Disk scheduling.
* Managing shared resources between various processes.
* Job scheduling algorithms.
* Round-robin scheduling.
* Recognizing a palindrome.

The queue is used when things don’t have to be processed immediately, but have to be processed in First In First Out order like Breadth-First Search. This property of Queue makes it also useful in the 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 the same rate as sent) between two processes. Examples include IO Buffers, pipes, file IO, etc.