Breaking News

# What is Queue and Which of the Following is Not a Type of Queue?

## What is Queue?

Queue is an abstract data type, which is a collection of elements, and is an ordered list. Queue follows a ‘First in First Out’ (FIFO) structure, which means that the first element added to the queue is the first one that is removed. Queue is important when it comes to creating efficient data structures, as it helps to arrange the data in a systematic way.

## Types of Queue

There are several different types of queue, each with its own unique characteristics and uses. The most common types of queue are:

### Circular Queue

A circular queue is a type of queue where the last element points back to the first element, thus forming a circle. This type of queue is useful when the size of the queue is fixed, as it allows the elements to be stored in a circular manner.

### Priority Queue

A priority queue is a type of queue where elements are stored according to their priority. In this type of queue, elements with higher priority are stored ahead of those with lower priority, and are removed first. This type of queue is useful when elements need to be processed according to their priority.

### Double-ended Queue

A double-ended queue is a type of queue where elements can be added or removed from either end. This type of queue is useful when elements need to be added or removed from both ends of the queue.

## Which of the Following is Not a Type of Queue?

The answer is: stack. A stack is a type of data structure that follows a ‘Last in First Out’ (LIFO) structure, which means that the last element added to the stack is the first one that is removed. This is different from a queue, which follows a ‘First in First Out’ (FIFO) structure.

In conclusion, queue is an important data structure for organizing data, and there are several different types of queue, each with its own unique characteristics and uses. The answer to the question “Which of the following is not a type of queue?” is stack.