## Difference Between queue.queue Vs collections.deque In Python

Both Queue and Deque are present in the built-in modules Queue and Collections in Python, both of them are widely used data structures, but they are used for different purposes....

Skip to content
## Difference Between queue.queue Vs collections.deque In Python

## Implement Stack Queue using Deque

## Priority Queue using Binary Heap

## Circular Queue | Set 2 (Circular Linked List Implementation)

## Difference between Circular Queue and Priority Queue

## Sort the Queue using Recursion

## Reversing a Queue

## Reversing first k elements Queue

## Reversing Queue using Recursion

## Priority Queue using Doubly Linked List

## Implementation Queue using Javascript

## Stack, Queue in Python using Module queue

## Priority Queue using Array in C

## Advantages of Circular Queue over Linear Queue

## Merge two sorted arrays in Python using heapq

## Merge two Binary Max-Heaps

## K-ary heap

## Implement stack using Priority Queue or Heap

## Applications of Queue Data Structure

## Implementation Binomial Heap

## Difference between Linear Queue and Circular Queue

## Difference Between Array, Queue and Stack

## Applications of Priority Queue

## Python Queue using Doubly Linked List

## Python Program for Heap Sort

## Queues in Python

## Check if a given Binary Tree is Heap

## Priority Queue in Python

## Stack and Queues in python

## How are variables stored in python – Stack or Heap?

Both Queue and Deque are present in the built-in modules Queue and Collections in Python, both of them are widely used data structures, but they are used for different purposes....

What is Deque? Deque is a double ended queue, i.e. a special kind of queue in which insertion and deletion can be done at the both rear as well as...

What is the priority queue? Priority queues are abstract data structures where each element in the queue has a priority value. For example, in any airline, baggage under the â€śFirst-Classâ€ť...

Circular Queue It is a linear data structure that works on the principle of FIFO (First in First out). In this type of queue element can be added in any...

Circular Queue It is a linear data structure that works on the principle of FIFO (First in First out). In this type of queue element can be added in any...

Problem Statement: Given a queue, we have to sort the queue using a recursive function without using any loop. We can only use the standard functions for it:- enqueue(element): Add...

Problem Statement: We have to reverse a queue by using only standard operations:- enqueue(element): Add an element to the rear end of the queue. dequeue(): Delete an element from the...

Problem Statement: Given a queue, we have to reverse the first k elements which are present in it. What is Queue? A Queue is a linear data structure. Queue follows...

Problem Statement: Given a queue, we have to make a recursive function to reverse it. Queue: A Queue is a linear data structure. Queue follows the FIFO rule i.e. First...

Problem Statement: Given nodes with their priority, we have to implement a priority queue using a doubly linked list. What is a Priority Queue? Priority queues are abstract data structures...

What is a Queue? Queue follows the principle of FIFO (First in First out) i.e. element which is inserted first will be removed first. The operation for insertion of elements...

In python, it is quite easy to implement stack and queue data structures. Stack works on the principle of LIFO (Last in First out) i.e. element which is inserted in...

Priority Queue Priority queues are abstract data structures where each element in the queue has a priority value. For example, in any airline, baggage under the â€śFirst-Classâ€ť or â€śBusinessâ€ť arrives...

Linear Queue It is a linear data structure that works on the principle of FIFO (First in First out) i.e. the element which is enqueued first will be dequeued first....

Heap Heap Data structure primarily focuses on representing priority queue. In Python, there is an inbuilt module â€śheapqâ€ť which is used for implementing Heap data structure. By default, Min Heap...

Binary Max - Heap A binary max - heap follows two conditions: The given tree must be a complete binary tree (All levels are completely filled except the last level...

K-ary heaps are similar to the binary heap (where K = 2) just having one difference that instead of 2 child nodes, there can be k child nodes for every...

What is a priority queue? The priority queue is a type of queue data structure having one extra feature of giving priority to every element present in the priority queue....

Queue A queue is basically a linear data structure that works on the principle of FIFO (First in First out) which means an element that is enqueued first will be...

In data structures, a binomial heap is similar to a binary heap that also supports the quick merging of two heaps. What is a Binomial Heap? A binomial heap is...

Linear Queue It is a linear data structure that works on the principle of FIFO (First in First out) i.e. the element which is enqueued first will be dequeued first....

Array: An Array is a collection of elements which are stored in a contiguous memory. The idea is simple i.e. to store the multiple elements together. Due to which we...

A Priority Queue is a special type of queue in which elements present in the queue are served according to their priority i.e. element with the higher priority will be...

What is a Queue? A queue is a linear data structure that works on the principle of FIFO(First in First out) i.e. the element which is inserted first will be...

Problem Statement: Given an array, we have to sort it using heap sort. Heap Sort is a sorting algorithm based on the binary heap data structure in which first we...

The queue is a linear data structure that works on the principle of First in First out (FIFO). In the queue, the element which is added at least recently is...

Problem Statement: Given a binary tree, our task is to check whether the given tree follows the max heap property or not. What is a Binary Tree? Binary tree is...

Priority Queue Priority queues are abstract data structures where each element in the queue has a priority value. For example, in any airline, baggage under the â€śFirst-Classâ€ť or â€śBusinessâ€ť arrives...

In data structures, stack and queue are part of linear data structure. Stack Stack follows the principle of LIFO (Last in First out) i.e. element which is inserted at last...

Memory allocation is the process of allocating memory to a computer program. In Python, the process of memory allocation and deallocation is handled automatically as there is a garbage collector...